A DO SHELL statement can be used to initiate any z/OS shell script or REXX program to run under z/OS UNIX. The z/OS shell scripts or REXX programs that are initiated by the DO SHELL statement are run by the BPXBATCH utility that runs under TSO/E.
Control-O AutoEdit variables embedded in a DO SHELL 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 SHELL statement can be delayed until the z/OS shell script or REXX program 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 z/OS shell script or REXX program.
When rule execution is resumed, the %%SHELLRC AutoEdit system variable will contain either the completion code of the BPXBATCH utility, or the value 522, which means that the TIMEOUT limit was reached before completion of the z/OS shell script or REXX program.
Server Types
DO SHELL statements are executed by Control-O servers. Servers are started tasks that are managed automatically by Control-O. You can use Immediate or General servers. These server types are discussed in detail in Chapter 5, "Control-O Servers." However, when defining a DO SHELL statement, bear in mind the following information:
Immediate servers are useful for either
To request an Immediate server, type Y (Yes) in the IMMEDIATE subparameter.
General servers are useful for those requests that do not need to be run by an Immediate server. Running requests by a General server consumes less resources than by an Immediate server.
To request a General server, type N (No) in the IMMEDIATE subparameter, or leave it blank.
For information on how to define servers, see the INCONTROL for z/OS Installation Guide.
Parent Topic |