Previous Topic: Execute TSO CommandsNext Topic: Access and Update Global Variables


Execute Operator Commands

You can execute JES, VM, and z/OS operator commands as well as any command that can be issued using the OPSCMD TSO command by calling OPSLINK with the following arguments:

CALL OPSLINK('OPSCMD',
             SYSID,
             SUBSYS,
             CMDSTR
             [,LINECOUNT
             [,ARRAY
             [,IMSID
             [,MFORM ]]]])

The SYSID and SUBSYS arguments have the same meanings as they do in CALL OPSLINK statements that execute TSO commands. The other arguments have these meanings:

CMDSTR

The system command to be executed. The command can be any command that can be issued using the OPSCMD command. The maximum length of the command string is 256 characters.

SYSID

The eight-character MSFID of the MSF system where the system command should execute. If you specify a value of all blanks, all binary zeroes or a single asterisk followed by seven blanks, the local system is assumed (the one on which the calling program is running). The name used will be the uppercased version of the one passed.

Note: The MSF feature must be installed and licensed if you specify anything other that the local system.

SUBSYS

The four-character subsystem name of the target CA OPS/MVS subsystem that should process this request. The name used will be the uppercased version of the one passed.

LINECOUNT

A fullword binary value that indicates the maximum number of output lines to be returned in the ARRAY argument. The value should be non-negative. If you specify zero, the default is used. If you specify the LINECOUNT parameter, you should also specify the ARRAY parameter.

The number of lines actually placed in the output array by OPSLINK is returned in this field. Instead of using a constant in the calling sequence, use the name of a program variable for this argument. Also, before each subsequent OPSLINK call, you must reinitialize this variable to the maximum number of lines that the array can hold.

ARRAY

A character string array in which the output from the request is returned.

IMSID

The IMSID of the IMS system where the command should be sent. The maximum length of the command string is four characters.

MFORM

A one-character operand that indicates the format of your output. If used, this operand must be either of the following: