If PROC1 is started in the same way as described in the previous section but executes the NCL statement:
&INTCMD SHOW USERS
the SHOW USERS command is executed in the dependent processing environment for the process. The messages generated by the command are not returned to the user's OCS window but queued in a stack called the dependent response queue. The process PROC1 can then issue the NCL statement:
&INTREAD ARGS
to read the results of the command from the dependent response queue one message at a time. The individual words of each message are tokenized and placed in variables of the form &1 &2... &n.
This technique lets a process issue a command and get the results back internally, so that the process can review the results and therefore make a decision based on the results of the command. This allows correlation of commands and results which in turn provides unlimited capability for complex logic to be built into processes to handle monitoring and automation of events.
The use of &INTCMD to execute commands privately in this way is called dependent execution of commands.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |