EXEC Control Statements-&CONTROL, &EMSG' 2. Each operand remains set until explicitly reset by another &CONTROL statement that specifies a conflicting operand. When &CONTROL is
used with no operands, all operands are reset to thetr default
3. There is no global setting for &CONTROL. When an EXEC is nested within another EXEC, the execution summary is controlled by the
nested EXEC's &CONTROL setting. When control returns to the outer EXEC, the original &CONTROL setting is restored. &EMSG Use the control statement to display a line of tokens to be edited
as a VM/370 error message. The format of the &EMSG control statement is:
r---- , &EM SG I mmmnnns (tok 1 ••• (tokn]] L. mmmnnn is a six-character identification you may supply for the error
message. Standard VM/370 messages are coded using a
three-character module code (mmm) and a three-character
message number (nnn).
s indicates the severity code. The following codes qualify the
message for error message editing: £Qde I
E W R Informa tion
Error Warning Response
tokl ••• [tokn]
is the text of the message to be displayed.
1. When the severity code is I, E, or w, the message is displayed in
accordance with the CP EMSG setting (ON, OFF, CODE, or TEXT). You can change the setting with the CP SET command, described in £f £Qmmsng for 2. When an &EMSG code is displayed, it is prefixed with DMS. For
example, the statement: &EMSG ERROR1E INVALID ARGUMENT displays as follows when the EMSG setting is ON: DMSERROR1E INVALID ARGUMENT 3. To display an error message with unsubstituted data, or to display
a line with words of more than eight characters, use the &BEGEMSG control statement. Section 5. EXEC control Statements 285
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
Previous Page Next Page