Rule-initiated CLISTs
An EXEC is Rule-initiated if its name is specified in the EXEC Name/Parms field of the Rule Processor Action Specification panel of a fired rule.
Refer to the Rule Processor chapters in the MainView AutoOPERATOR Basic Automation Guide, Volume 1: Using Rules for more information about writing Rules and how to write a Rule that schedules an EXEC.
Potential use
EXECs that are scheduled by a Rule through the Rule Processor application can perform automation that cannot be performed by a Rule.
For example, a Rule-initiated EXEC can, based on the text of a message, issue ALERTs, submit other EXECs, or invoke SYSPROG services. In general, use Rule-initiated EXECs to perform advanced automation as a result of a message.
Parameters passed to the EXEC
The individual words of the message that caused a Rule to fire are passed as input to the EXEC.
A word is any character string separated by a blank or a comma.
The message
is an example of a message that can cause a Rule to fire. If the Rule has an EXEC associated with it, the words of this message are passed as parameters to the PROC statement of the EXEC.
Specifying additional parameters
From the Rule Processor Action Specification panel, you also can specify additional parameters that you want to send to the EXEC.
This specification is done on the EXEC/Parms field of any Action Specification panel.
Note that the first parameter specified in this field becomes the first parameter passed to the EXEC. Subsequent parameters are passed to the EXEC in the order they were entered
This process means the message ID and any message text will not be passed to the EXEC. To have the message ID and any message text passed to the EXEC, the Rule must use the &IMFTEXT variable.
Example
The following is an example of a Rule-initiated EXEC scheduled by the Rule that is handling the $HASP103 message.
Figure 1. Rule-Initiated CLIST example
/*********************************************************************/
/* DOC GROUP(MVS) FUNC(JES2) CODE(J2) */
/* DOC DISP(YES) AUTHOR(B&B) */
/* DOC DESC(RESPOND TO $HASP103 AND WRITE MESSAGE TO JOURNAL) */
/*********************************************************************/
IMFEXEC MSG 'JOB &SETUP IS REQUESTING &W2'
EXIT
The positional parameters passed to the PROC statement of the Rule-initiated EXEC are shown in the following table:
Positional Parameter | Variable name | Value passed | Description of value passed |
|---|---|---|---|
1 | MSGID | $HASP103 | is the message ID of the message that fired the Rule that calls this EXEC |
2 | SETUP | CMFTEXT | is the name of the job requesting a tape mount |
3 | W2 | BAB031 | is the volume serial number of the tape to be mounted |
4 | W3 | . | is a dummy value used to fill in for the fourth parameter that was not passed with the message |
Describing the example
This EXEC issues the IMFEXEC MSG command to write a message to the BBI-SS PAS Journal that, when all the values from the input are substituted for the PROC statement parameters, translates into the following example: