Previous Topic

Next Topic

Book Contents

Book Index

General Information

This parameter issues operator commands, and VM/CP commands if z/OS is operating under VM.

Control-O AutoEdit variables embedded in the DO COMMAND parameter are automatically resolved (replaced) at time of rule activation. For more information about the AutoEdit facility, see AutoEdit Facility.

Issuing a Command

The manner in which a command is issued depends on the values of the RUNTSEC runtime scheduling parameter or the WAIT DO COMMAND subparameter.

If runtime security is active for a rule (the RUNTSEC subparameter set to OWNER or TRIGGER), the operator commands issued by a DO COMMAND will always be issued by the Control-O monitor and not under the same address space of the command that triggered the rule.

If a WAIT value is not specified, the command is issued immediately under the same address space of the message or command that triggered the rule. If a WAIT value is specified, even a value of 0, the command is issued by the Control-O monitor after the specified interval. However, the WAIT subparameter applies only to its DO COMMAND parameter, and any subsequent DO statements are performed immediately without regard to the WAIT value.

Command-Response Mode

A rule containing a DO COMMAND statement can be executed in command-response mode. In this mode, messages issued in response to an operator command can be intercepted by Control-O in the same rule that issued the command, and additional actions can be taken depending on these messages.

Control-O can intercept these messages by one or more of the following methods:

When the rule resumes execution after DO COMMAND, the %%$WAITRC system variable indicates the type of event that caused the end of the wait. Valid values for %%$WAITRC are shown in Table 125.

Table 125 Values passed to %%$WAITRC by DO COMMAND Parameter

Value

Description

0

No wait was issued.

12

One of the specified message IDs was detected.

When Wish O10261 is enabled:

  • If message IDs were specified (using the RESPMSG parameter): one of them was found
  • Otherwise, a complete response was received.

522

The specified time-out limit was reached.

Specifying Command-Response Mode

A rule is placed in command-response mode by typing Y (Yes) in the WAITMODE field. The following subparameters determine the methods used by Control-O to intercept messages:

The WAITRESP and RESPMSG parameters can also be specified for VM/CP commands, if z/OS is operating under VM.

The TIMEOUT parameter indicates how long to wait for responses before continuing to the next DO statements. TIMEOUT values are optional.

Processing the Command Response

When a rule is executing in command-response mode, that is, when WAITMODE is set to Y in a DO COMMAND statement, Control-O suspends rule execution until either the specified time-out is reached, or a last line (the last line of a multi-line message) is detected.

A command response can consist of several different combinations of messages:

Performing DO Statements in Command-Response Mode

It may be desirable to perform a set of DO statements each time an individual response message is intercepted. It may be desirable to accumulate all intercepted response messages and then perform a set of DO statements once. The exact way DO statements are performed is determined by their position relative to the DO ENDMSG statement:

Parent Topic

DO COMMAND: Automated Console Action Parameter