Previous Topic: Waittime Before TimeoutNext Topic: OSFTSO Command


REXX Variables Set at Termination

At the termination of an OPS OPER command the following REXX variables will be set:

OPS.OPER.RETCODE

The return code from the z/OS command executed (or attempted). If the command could not be executed, this return code indicates the specific error.

OPS.OPER.TIMEOUT

If CMDWAIT plus SYSWAIT or WAIT plus SYSWAIT were exceeded, the value is set to YES; Otherwise, the value is set to NO.

OPS.OPER.MAXCMDOUT

If MAXCMDOUT number of lines was exceeded, the value is set to YES; otherwise, the value is set to NO.

Note: If the responses all come back before the specified timeout period and below the number specified by MAXCMDOUT, the OPS.OPER.TIMEOUT and OPS.OPER.MAXCMDOUT variables are set to NO.

Return Information:

The OPER command returns each line of output returned by the Z/OS command specified by COMMAND. For more information, see ADDRESS OPS Return Information in this chapter.

For a list of all possible return codes that CA Automation Point returns to REXX callers of address OPS OPER in the REXX variable OPS.OPER.RETCODE, see Return Codes From OPSCMD in the CA OPS/MVS for z/OS Command and Function Reference.

Example:

This sample REXX fragment uses OPER to issue the z/OS command D T and display the responses. The D T command is directed to the CA OPS/MVS system with an MSF ID of OPS123:

ADDRESS OPS "OPER COMMAND ('D T') SYSTEM(OPS123)"
If rc<> 0 then do
   say "OPS OPER failed; rc=" rc
   return
end
do i = 1 to ops.oper.0
   say ops.oper.i
end
say "OPS return code=" ops.oper.retcode

Note: In the example above, ops.oper.0 contains the number of lines of response.