Previous Topic

Next Topic

Book Contents

Book Index

General Information

A DO TSO statement can be used to initiate any TSO command, CLIST or REXX procedure that does not require terminal input (that is, one that is executable from READY mode without prompting for additional information).

Use of the TSO option can be resource-consuming (because of the nature of TSO). For performance reasons, whenever possible, use regular Control-O functions or Control-M activated tasks.

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

Wait Completion Mode

Execution of the DO statements that follow a DO TSO statement can be delayed until the TSO command, CLIST, or REXX procedure has finished executing, thereby enabling checking of the completion code. This delay is achieved by specifying Y (Yes) for the WAITMODE subparameter, which places the rule in Wait (Completion) mode. The TIMEOUT subparameter can be used to specify how long (in seconds) to wait for completion of the TSO command, CLIST, or REXX procedure.

When rule execution is resumed, the %%TSORC AutoEdit system variable will contain either the completion code of the TSO command, CLIST, or REXX procedure, or the value 522, which means that the TIMEOUT limit was reached before completion of the TSO command, CLIST, or REXX procedure.

Wait mode can also be specified for a TSO command, CLIST, or REXX procedure execution by specifying a DO SET=%%WAITTSO = Y statement before the DO TSO statement. Using this method, a TIMEOUT period may be specified through a DO SET %%TIMEOUT=value statement. This method is supported for historical reasons.

Using a Preset Environment

DO TSO statements are executed by Control-O servers. Servers are started tasks that are managed automatically by Control-O. You can define Immediate, Special, and General servers. These server types are discussed in detail in Chapter 5, "Control-O Servers." However, when defining a DO TSO statement, bear in mind the following information:

Parent Topic

DO TSO: Automated Console Action Parameter