EXEC Control Statements-&GOTO, &HEX &GOTO Use the &GOTO control statement to transfer control to a specific
location in the EXEC procedure. Execution then continues at the
location that is branched to. The format of the &GOTO control statement
is:
r I &GOTO {
TOP
} I line-number I -label L- TOP transfers control to the first line of the EXEC file.
line-number transfers control to a specific line in the EXEC file.
-label transfers control to a specific label in the file. A
label must begin with dash (-), and it must be the first
token on a line. The remainder of the line may contain an
executable statement or it may be null.
1. Scanning for an EXEC label starts on the line following the &GOTO statement, goes to the end of the file, then to the top of the
file, and (if unsuccessful) ends on the line above the &GOTO statement. If more than one statement in the file has the same
label, the first one encountered by these rules satisfies the
search.
2. To provide a branch up or down a specific number of lines in the EXEC, use the control statement.
&HEX Use the control
conversion in an EXEC statement is:
r I &HEX I L
statement to initiate or
procedure. The format of
inhibit hexadecimal
the &HEX control
-----------, , , ON indicates that tokens beginning with the string X' are to be
interpreted as hexadecimal notation. indicates that no hexadecimal conversion is to be done by EXEC. OFF is the default setting. VM/37Q eMS Command and Macro Reference
EXEC Control Statements-&HEX, &IF
1. Yocr should use the &HEX control statement when you want to display
a hexadecimal value. For example: &HE'( ON &'IYPE X'40 &HE,( results in the display: 29 If vou did not use the &HEX ON control statementi the STIPE statement would result in the display: '('40 2. To convert a hexadecimal value to its decimal equivalent, use an
assignment statement.
3 The Guide should be consulted for examples of correct usage of EXEC control statements
in effect.
details and
with SHEX ON &IF Use the &IF control statement to test a condition in an EXEC procedure
and to perform a particular action if the test is valid. If the test is
invalid, execution continues with the statement following the &IP control statement. The format of the &IP statement is: r &IF '---- tokenl
token2 {
{token
l}" &$ operator executable-statement
&*
may be numeric constants, character
symbols. All variable symbols are
statement is executed.
J
strings, or EXEC variable
substituted before the SIF &$ tests all of the arguments entered when the EXEC was invoked.
If at least one of the arguments satisfies the specified
condition, the &IF statement is true. &* tests all of the arguments entered when the EXEC was invoked.
All of the entered arguments must meet the specified condition
in order for the &IF statement to be true.
operator indicates the test to be performed on the tokens. If both
tokens are numeric, an arithmetic test is performed.
otherwise, a logical (alphabetic) test is performed. The
comparison operators, listed below, may be specified either in
symbolic or mnemonic form: 2YID£Q! = or EQ
..,= or NE
< or LT
<= or LE
> or GT
>= or GE equals
not equal
less than
less than or equal to (not greater than)
greater than
greater than or equal to (not less than)
Section 5. EXEC Control statements 289
Previous Page Next Page