EXEC Control Statements-&EXIT &EXIT Use the &EXIT control statement to terminate processing the EXEC file.
If the exit is taken from a first-level EXEC procedure, control passes
to If the exit is taken from a nested EXEC procedure, control
passes to the calling EXEC procedure. The format of the &EXIT control
statement is:
r------ I I &EXI! , r , I return-code I I Q. I , L .J L- return-code
specifies a numeric value, which may be a variable symbol, to
be used as the return code from this EXEC. If the return code
is not specified, it defaults to O. 1. If control is returned to CMS, the CMS ready message indicates the
return code value. Thus, the statement: &EXIT 12
results in the ready message:
R (OOO 12) ;T=O/02 15: 32: 34 2. If you specify: &EXIT &RETCODE
the return code value displayed is the return code from the most
recently executed eMS command. Section 5. EXEC Control statements 287
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
Previous Page Next Page