Flow of Control

In a situation where a non-SA z/OS command needs issuing, specify the user CLIST or command processor in the OPCACMD entry of the subsystem.

In response to the request, instead of issuing an SA z/OS command, TWS Automation passes control to this user CLIST or command processor. All information available is made accessible to the user-supplied module. If the user-supplied module does not trigger a status change of the subsystem and returns control to TWS Automation synchronously, you are responsible for completing the operation. This should be done by calling OPCACOMP once the results of these commands are analyzed. The OPCACOMP module ensures that actions are accomplished in the correct sequence, does some housekeeping, updates the SA z/OS control information, and calls the OPCAPOST command processor to return the specified completion code to TWS; for more details see Implementing Completion of a Request.

Figure 1 shows the flow including the user responsibilities.
Figure 1. Request Flow for a Subsystem-Related User Function
Request Flow for a Subsystem-related User Function

To simplify implementation, you may plan to only use the timer function or only the detection of the completion of the command. If you use only the event-driven method, then consider what happens if the anticipated event fails to occur.