RES
When BMC AMI Ops Automation for z/OS is not installed, use the IMFEXEC CMD (MVS command with response) command to access basic SYSPROG services as a Started Task by using an MVS MODIFY command to the SYSPROG services task.
Command | Parameters |
---|---|
RES | SYSPROG command or 'SYSPROG command' WAIT(60|nnnn) |
Output from SYSPROG service commands is placed in LOCAL variables LINE1 through LINEnn, where IMFNOL contains the number of lines returned. Parentheses in the output are removed. These variables must be retrieved by using an IMFEXEC VGET command before they can be used in an EXEC.
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
SYSPROG service command | SYSPROG service command, including any required parameters | Use any supported SYSPROG services command. |
WAIT(60|nnnn) | Amount of time to wait for a response from the command | The default is 60 seconds or nnnn, which can be a value from 0 to 9999 seconds. |
Condition codes are listed in the following table:
Value | Description |
---|---|
0 | Command was executed successfully. |
8 | No service parameter was passed when required. |
12 | Command timed out in interface to SYSPROG service (the response time exceeded 60 seconds). |
20 | BMC AMI Ops Automation for z/OS is not installed. |
Example
The output from this example is automatically put into variables named LINE1 - LINE nn, where nn is the number of lines in the output. The variable ASML1 is declared to contain a list of seven variables. The first line of the output is placed into ASML1, which parses the line automatically into the seven variables.
"IMFEXEC RES ASM"
"IMFEXEC VDCL ASML1 LIST(V1 V2 V3 V4 IPLTYPE V6 V7)"
"IMFEXEC VGET LINE1 INTO(ASML1) LOCAL"
"IMFEXEC VPUT IPLTYPE"
"IMFEXEC MSG 'AN IPL "IPLTYPE "START WAS PERFORMED'"
CLIST example:
IMFEXEC VDCL ASML1 LIST(V1 V2 V3 V4 IPLTYPE V6 V7)
IMFEXEC VGET LINE1 INTO(ASML1) LOCAL
IMFEXEC VPUT IPLTYPE
IMFEXEC MSG 'AN IPL &IPLTYPE START WAS PERFORMED AT &SYSTIME'
The IPLTYPE variable is put into the SHARED variable pool and a message is issued to the Journal to indicate that a certain type of IPL start was performed.