executes successfully, because when each statement is scanned, the token -PROBABLY is truncated to the same eight-character token, -PROBABL. • A label name may be the object of an SGOTO or SLOOP control
statement.• A label that is branched to must be the first token on a, line. It
may stand by itself, with no other tokens on the line, or itmay precede an executable CMS command or EXEC control statement.
The following are examples of the correct use of labels:SGOTO -LABl -LABl -LAB2 SCONTIBUE -CHECK SIF SINDEX EQ 0 SGOTO -EXIT SIF SINDEX LT 5 SSKIP -EXIT SEXIT 4 STYPE SLITERAL SINDEX VALUE IS SINDEX CONDITIONAL EXECUTION WITH THE SIF STATEMENT The main tool available to you for controlling conditional execution in
anEXEC procedure is the SIF control statement. The SIF control
statement provides the decision-making ability that you need to set up
conditional branches in yourEXEC procedure. One approach to decision-making with the SIF control statement is to
compare two tokens, and perform some action based on the result of the
co.parison.When the comparison specified is equal (or true), the
executable statement is executed.When the comparison is unequal (or
false), control passes to the next sequential statement in theEXEC procedure. An example of a simple SIF statement is: SIF Sl EQ S2 STYPE MATCH FOUND If the comparand values are not equal, the statement STYPE MATCH FOUND is not executed, and control passes to the next statement in the EXEC procedure. If the co.parand values are equal, the statement STYPE MATCH FOUND is executed before control passes to the next statement. SIF statements can also be used to establish a comparison between a
variable and a constant. For example, if a terminal user could properly
enter aYES or NO response to a prompting message, you could set up SIF statements to check the response as follows: SREAD ARGS SIF Sl EQ YES SGOTO -YESANS SIF Sl EQ NO SGOTO -NOANS STYPE S1 IS NOT A VALID RESPONSE (MUST BE YES OR NO) SEXIT -YESANS -NOANS In this example, the branch to -YESANS is taken
argument isYES; otherwise, control passes to the next
276IBM VM/370 eMS User's Guide
ifthe entered SIF statement.
statement.
may stand by itself, with no other tokens on the line, or it
The following are examples of the correct use of labels:
an
statement provides the decision-making ability that you need to set up
conditional branches in your
compare two tokens, and perform some action based on the result of the
co.parison.
executable statement is executed.
false), control passes to the next sequential statement in the
variable and a constant. For example, if a terminal user could properly
enter a
argument is
276
if