NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.INTYPE
System Variables
5–50 106126 Tandem Computers Incorporated
&SYS.INTYPE The &SYS.INTYPE system variable contains the name of the dependent queue on
which a message has arrived.
&SYS.INTYPE contains REQ if the message was from the dependent request queue or
RESP if the message was from the dependent response queue. If there is no message,
&SYS.INTYPE contains a null value.
&SYS.INTYPE
Considerations
Messages can be entered into one of two queues in the dependent processing
environment of any NCL process: the response queue and the request queue. The
response queue holds messages containing the results of the INTCMD verb. The
request queue holds messages sent from another NCL process or from an OCS
operator by using the default version of the INTQ command. The INTQ command
can also explicitly enter messages into the response queue.
See the INTCMD, INTCONT, and INTREAD verbs in Section 3, “Verbs.”
For further information on the INTQ command, refer to the NonStop
NET/MASTER MS Command Reference Manual.
Example
In the following example, the procedure INTREQ executes a DO loop to wait for a
message to arrive. It displays its own NCL process identifier (NCLID) and then waits
for a message. When the message arrives, the &SYS.INTYPE system variable is
displayed, showing the queue that contained the message. The INTREAD verb is
coded to receive messages from either the response or the request queue, by using the
option TYPE=ANY:
INTREQ: PROCEDURE
/* GET A MESSAGE AND SAY WHETHER IT’S A REQ OR RESP */
ON ERROR FLUSH
SAY "NCLID OF INTREQ = " &SYS.NCLID
DO FOREVER
INTREAD WAIT=YES TYPE=ANY
SAY "THE MESSAGE IS ON QUEUE " &SYS.INTYPE
INTCONT
END
END INTREQ
A message can be generated using the INTQ command at the OCS window as follows:
INTQ ID=
nnnn
DATA=A SUITABLE MESSAGE
nnnn
is the NCLID of the process to which the message is sent. In the previous
example, the procedure INTREQ displays this NCLID.