Rule-initiated EXECs initiated by MVS multiline or multisegment messages
Rule-initiated EXECs fired by multiline WTOs or multisegment message can access only the first line or segment of the MVS or IMS message with symbolic parameters on the PROC statement.
For more information about Rule-initiated EXECs, see Rule–initiated REXX EXECs.
To access the additional lines and segments in the MVS or IMS message, the EXEC must use the IMFEXEC VGET statement to read LOCAL variables for LINE1 through LINExxxx (depending on the number of lines of the WTO).
The actual number of lines or segments in the MVS or IMS message is stored in the TSO variable IMFNOL. If you have five lines, IMFNOL=5.
Potential use
This example shows how to access the additional lines of information from multiline WTOs or multisegment messages.
The following shows an MVS multiline WTO that fired a Rule-initiated EXEC:
984 TIME=10.51.34
Describing the example
In this example, the ARG statement does not contain any symbolic parameters because the first line of the message is retrieved from the LINE01 variable.
However, in general, the first line could also be retrieved by using symbolic parameters (such as in Rule-initiated EXECs). The example in this section demonstrates this process. The EXEC simply retrieves all lines of the IEF450I message and writes the output of this message to the BBI-SS PAS Journal.
Example
REXX EXEC example:
/******************************************************************/
/* DOC GROUP(AOS) FUNC(AOSAMP) DESC(RETRIEVING MULTILINE WTO) */
/* DOC DISP(YES) AUTHOR(JAC) */
/******************************************************************/
DO I = 1 to IMFNOL
"IMFEXEC VGET LINE"I" LOCAL"
"IMFEXEC MSG '"VALUE('LINE'I)"'"
END
CLIST example:
/* DOC GROUP(AOS) FUNC(AOSAMP) DESC(RETRIEVING MULTILINE WTO) */
/* DOC DISP(YES) AUTHOR(JAC) */
/*********************************************************************/
IMFEXEC MSG '******************************************'
SET I=1
SET &SYSSCAN=0
SET AMPER=&
SET &SYSSCAN=16
DO WHILE &I LE &IMFNOL
IMFEXEC VGET LINE&I LOCAL
IMFEXEC MSG &ER.LINE&I
SET I=&I + 1
END
IMFEXEC MSG '******************************************'
Related topic