Previous Topic: External Data QueueNext Topic: How OPS/REXX Gets Host Command Output


Issue Commands from Rules without Host Command Responses

Some types of AOF rules do not process responses from host commands. For example, message rules run synchronously in the z/OS subsystem exit, so they do not wait for commands to generate output.

To issue a command from a rule that does not process command responses:

  1. Write the command as an asynchronous command procedure (using either TSO/E REXX or OPS/REXX).
  2. Write your rule so that it runs the procedure in a server address space.

Example: Issue Commands from Rules

The following OPS/REXX program issues a 'D A,L' operator command and displays the responses at the terminal of the user:

address OPER
"D A,L"             /* responses placed in external data queue */
 do while queued() > 0
   parse pull x     /* retrieve a line from the queue          */
   say x            /* display it at the terminal              */
 end

If a rule needs to issue a command, and then act upon the command response, make the rule a request rule and invoke it from a different command procedure.