NET/MASTER Network Control Language (NCL) Programmer's Guide
Sending a Message Between NCL Processes Using the WRITE Verb
Environments and Command Processing
16–44 106160 Tandem Computers Incorporated
Sending a Message
Between NCL
Processes, Using the
WRITE Verb
You can use the WRITE verb, by specifying an NCL ID, to send a message from one
NCL process to the dependent request or response queue of a target NCL process.
When you are sending messages between NCL processes, you should carefully
consider how to send the message and how to read the message. You can use the
WRITE verb to send:
Text, specified by using the DATA operand.
One or more ordinary variables, specified by using the ARGS or VARS operand
(with or without additional text).
An enclosed MDO variable, specified by using the MDO operand (with or without
additional text).
You can use an INTREAD verb in the target NCL process to read the message from the
dependent request or response queue. When reading a message into variables, you
can use the INTREAD verb:
Without any variable specification, to read the whole message into the &$INT.
MDO variable.
With either the ARGS or VARS operands, to read either the text or the values in
the ordinary variables into ordinary variables.
With the MDO operand, to read an enclosed MDO variable (if one is present in the
message) into a user-specified enclosing MDO variable.
You can also specify how to parse a message by specifying the PARSE operand in the
INTREAD verb (the default is PARSE=YES).
The following discussion describes the options that are available to you to send a
message from one NCL process to a target NCL process.
You can use the LOGREAD and MSGREAD verbs to read a message into variables in
the same way as the INTREAD verb. LOGREAD is used in the LOGPROC NCL
procedure: you can send a message to LOGPROC (if it is active) by specifying WRITE
LOG=YES. MSGREAD is used in a MSGPROC NCL procedure: you can send a
message to a MSGPROC NCL procedure (if one is active for an OCS window) by using
a variety of WRITE verb operands. These verbs are discussed in detail in Section 17,
“Developing System-Level NCL Procedures.”
Sending Text You can send text between NCL processes by using the DATA operand of the WRITE
verb. The DATA operand is followed by an expression, which can contain either
constant or variable values, or both.
When an INTREAD verb reads a message, the specified text is placed in the
&$INT.TEXT MDO variable. If the DATA operand is not used or specifies a null
value, the value of &$INT.TEXT is null. The &$INT.USERMDO and
&$INT.MAPNAME MDO variables are both null.
The following WRITE verb specifies the DATA operand to send text:
WRITE NCLID=&nclid DATA=a b c