NET/MASTER Network Control Language (NCL) Programmer's Guide
Sending a Message Between NCL Processes Using the WRITE Verb
Environments and Command Processing
16–48 106160 Tandem Computers Incorporated
5. Observe the results of using the WRITE verb from ZEX1617N to send text to
ZEX1616N, as the following screen shows:
(13:40) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX1616N
NCL ID of ZEX1616N is 265
START ZEX1617N
&1 is a
&2 is b
&3 is c
This message does not have a USERMDO
&$INT.TEXT is a b c
&$INT.USERMDO is
&$INT.MAPNAME is
Elements and fields in &MDO. are
Element TEXT is a b c
Element MSGATTR is ... .. .. ". .
Element DISPLAY is .
Field BKGCOLOR is NONE
Field BKGCOLOR# is 0
Field COLOR is WHITE
Field COLOR# is -9
Field HLITE is NONE
Field HLITE# is 0
Field INTENS is NORMAL
MSG QUEUED ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
6. Flush ZEX1616N, using the following FLUSH command:
FLUSH ID=
nclid-of-zex1616n-ncl-process
Flushing ZEX1616N also deletes the &GLBLZEX1616N global variable.
Specifying an MDO Variable When Reading a Message
The following two NCL procedures show how to use the WRITE verb to send text
from one NCL process to another NCL process (a MSGPROC NCL process in this
example) that specifies an MDO variable when reading a message. To see how these
NCL procedures work, follow these steps:
1. Type the first NCL procedure as shown, calling it ZEX1620N:
zex1620n: PROCEDURE
/* MSGPROC to analyze messages containing a USERMDO element, */
/* which indicates it contains an enclosed MDO variable. */
DO FOREVER
/* If message has USERMDO, put in &mdo. */
MSGREAD MDO=&mdo.
IF &$msg.usermdo \= "" THEN DO
SAY "This message has a USERMDO mapped by "&$msg.mapname
/* $MSG and $NCL are two most common maps used */
SELECT &$msg.mapname
WHEN $MSG THEN DO
SAY "&MDO.TEXT = "&mdo.text
/* Parse text into variables */
PARSE ARGS DATA=&mdo.text
DO &cvar = 1 TO &SYS.VARCNT