These parameters are in the form of a user-controlled parameter string that is stored, with the exit name, in the knowledge base. Parameters passed directly to the exit, such as the ones shown in the following example, are stored in the system variable &ALLPARMS:
CUSTACT=NOTIFY USER=FRED TEXT="Fred, the problem's fixed!"
Parameters passed directly to the exit can be in the keyword or the positional format. However, if $NCL calls the exit, positional parameters are not accepted. The positional format is not recommended.
The following code fragment processes the parameters stored in the system variable &ALLPARMS and sets a return code. This code fragment can only process parameters that are in the keyword format:
&SETVARS PREFIX=PARM ERROR=CONTINUE DATA=&ALLPARMS &IF &RETCODE NE 0 &THEN + &DO &SYSMSG = &STR &0-001 PARM ERROR MSG=&SYSMSG &RETURN &SYSMSG &DOEND
If the parameters are not in the keyword format, the system variable &RETCODE is set to eight. An error message loaded into the system variable &SYSMSG. Using information from the &SETVARS statement, the &DO group of statements set an error message that:
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |