As described in the preceding sections, a process receives the results of commands that it issues using the &INTREAD verb. In concept there is a queue associated with the process, to which can be added messages that represent the results of commands. The &INTREAD statement allows the process to take messages off the queue one by one and process them as required.
The queue used for the messages generated by commands is called the dependent response queue.
The INTQUE command can also be used to place messages on a process's dependent response queue either by entering the command from an OCS window command entry line, or (more commonly) by issuing the INTQUE command from a different process.
Example: INTQUE command
The following example illustrates the concept. An OCS operator enters:
START PROC1
from the OCS window, which starts the process PROC1.
PROC1 then executes the following statements:
&WRITE DATA=&ZNCLID READY FOR WORK. &INTREAD ARGS
At this point the process suspends execution pending the arrival of message(s) on its dependent response queue.
The operator, or another NCL process, then enters:
INTQUE ID=357 TYPE=RESP DATA=BEGIN
where 357 is the NCL process identifier of the process PROC1 and TYPE=RESP indicates that the text of the command is to be placed on the PROC1 dependent response queue. The &INTREAD of the process then completes, with the variable &1 containing the word BEGIN. The process can then go ahead with whatever other processing is required, having used the &INTREAD and INTQUE combination to provide direct communication between the process and the operator.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |