This statement builds a message using a message definition. The BUILD MESSAGE function returns the built message in &SYSMSG.
This statement has the following format:
&CONTROL NOSHRVARS -EXEC $CACALL OPT=ACTION ACTION=BUILD CLASS=MESSAGE NAME=‘MESSAGE=message id’ PARMS=‘PROCNAME=procedure name [P1=parameter1... P10=parameter10]’
A required parameter giving the identifier of the message to be built.
A required parameter giving the name of the procedure that requested the message to be built.
Optional parameters providing data values to be substituted into the message definition.
This statement has no input variables.
This statement contains the following return variables:
System message. Contains either:
If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:
Definition not found
Processing error
Nesting level exceeded
The message definition for message SAMP01 is as follows:
VSAM ERROR ON FILE ~P1 RC=~P2 FDBK=~P3
Use the following statements to build the SAMP01 message:
&CONTROL NOSHRVARS -EXEC $CACALL OPT=ACTION ACTION=BUILD CLASS=MESSAGE NAME=‘MESSAGE=SAMP01’ PARMS=‘PROCNAME=&0 P1=&FILEID P2=&FILERC P3=&VSAMFDBK’
&0 contains the name of your procedure; &FILEID, &FILERC, and &VSAMFDBK contain, respectively, the values for ~P1, ~P2, and ~P3 in the message definition.
| Copyright © 2008 CA. All rights reserved. |
|