Previous Topic: Console Commands for CAS9FEMSNext Topic: Optional Batch Operation


Submit a Command to z/OS with CAconsole

Valid on z/OS

Use the Event Management CAconsole command at any terminal to submit a command or commands to z/OS and ascertain the results of those requests. The result of a z/OS command, which is typically displayed on the z/OS console or recorded in the z/OS system log, instead is returned to the CAconsole application and can optionally be captured in an application log.

Note: The choice of z/OS commands is not limited to the commands supported by IBM. These commands also include all interface commands that any z/OS application program supports.

Syntax

CAconsole [-Ttimeout] [-X] [-V] [cmdseq|<cmdfile] [>logfile]
-Ttimeout

Number of seconds to wait for a response to the z/OS command. If no timeout is specified, CAconsole continues to wait for a response.

-X

Transforms the z/OS command to uppercase before sending it to the z/OS Operator Messaging Facility.

-V

Retains the result of the command and directs it to standard output or to a log file, when one is specified.

cmdseq

z/OS command to send.

<cmdfile

A file containing the z/OS command or commands to send. If a command or a command file not is specified, the command is taken from standard input.

>logfile

Name of a file to which the result of the command is directed. If none is specified, the result is sent to standard output.

Examples

The command D TS,L is sent to the z/OS Operator Messaging Facility. The result of the command is sent to standard output. -T specifies a timeout value of 1234 seconds, after which CAconsole considers that no output was received.

CAconsole -T1234 -V D TS,L

The command D TS,L (after translation to uppercase) is sent to the z/OS Operator Messaging Facility. The result of the command is sent to standard output. -T specifies a timeout value of 1234 seconds, after which CAconsole considers that no output was received.

CAconsole -T1234 -V -X d ts,l

The file mycmdfile.txt is examined and each line within it is considered a separate command that is sent to the z/OS Operator Messaging Facility. The result of each command is sent to standard output. No timeout is specified, indicating that each command sequence results in a theoretical infinite wait for a response.

CAconsole  -V <mycmdfile.txt

The file mycmdfile.txt is examined and each line within it is considered a separate command that is sent to the z/OS Operator Messaging Facility. Each command-line sequence is translated to uppercase before it is sent. The result of each command is sent to standard output. The CAconsole facility waits up to 60 seconds before considering that no output was received from that command and then move on to the next command line within the file specified.

CAconsole  -V -X -T60 <mycmdfile.txt

The file mycmdfile.txt is examined and each line within it is considered a separate command that is sent to the z/OS Operator Messaging Facility. Each command-line sequence is translated to uppercase before it is sent. The CAconsole facility waits up to 60 seconds before considering that no output was received from that command and then move on to the next command line within the file specified. The output is directed to the file mylog.

CAconsole -V -X -T60 <mycmdfile.txt >mylog