EXEC Control Statements-SEND, &ERROR &END Use the SEND =ontrol statement to terminate a list of one or more lines
that with an SBEGEftSG, &BEGPUNCH, SBEGSTACK, or SBEGTYPE control
statement. The format of the &END control statement is: r 1 , SEND , L _____ _
J The word "SEND" must be entered beginning in column 1. &ERROR Use the &ERROR control statement to specify the action to be taken when
a CftS command or nested EXEC procedure results in an error and returns
with a nonzero return code. The format of the SERROR control statement
r 1 I , , SERR:lR , r , I executable-statement, I , , , I L .J L-- ___ _
specifies any executable statement, which may be an EXEC control
statement or assignment statement or a command. If you specify
an EXEC control statement that transfers control to another line in
the EXEC, execution continues at the specified line. Otherwise, elecution continues with the line following the command line that
caused the error.
1. If your EXEC does not contain an SERROR control statement, then the
default is 8CONTINUE; that is, EXEC processing is to continue with
the line following the CftS command that caused the error. You can
use SERROR &CONTINUE to reset a previous &ERROR statement.
2. The words following an &ERROR control statement are not scanned
until a CMS command returns a nonzero return code or a nested EXEC procedure exits using &EXIT to return a nonzero return code.
Therefore, if you specify an invalid EXEC statement, the error is
not detected until a nonzero return code triggers the &ERROR statement. If the SERROR statement executes a CKS command that
also results in an error, EXEC processing is terminated.
286 VM/370 eMS Command and Macro Reference
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
Previous Page Next Page