Previous Topic: Console Commands for CAS9FEMS

Next 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. Using CAconsole, the result of a z/OS command, which is normally 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 those supported by IBM but also includes all interface commands that may be supported by any z/OS application program.

This command has the following format:

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

The 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 either to standard output or to a log file, if one is specified.

cmdseq

The z/OS command to send.

<cmdfile

A file containing the z/OS command or commands to send. If neither a command nor a command file 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 will be sent to standard output. -T specifies a timeout value of 1234 seconds, after which CAconsole will consider 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 will be sent to standard output. -T specifies a timeout value of 1234 seconds, after which CAconsole will consider that no output was received.

CAconsole -T1234 -V -X d ts,l

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

CAconsole  -V <mycmdfile.txt

The file mycmdfile.txt will be examined and each line within it will be considered a separate command that is to be sent to the z/OS Operator Messaging Facility. Each command line sequence will be translated to uppercase before it is sent. The result of each command will be sent to standard output. The CAconsole facility will wait 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 will be examined and each line within it will be considered a separate command that is to be sent to the z/OS Operator Messaging Facility. Each command line sequence will be translated to uppercase before it is sent. The CAconsole facility will wait 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 will be directed to the file mylog.

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