NET/MASTER Network Control Language (NCL) Programmer's Guide
Sending a Message Between NCL Processes Using the WRITE Verb
Environments and Command Processing
106160 Tandem Computers Incorporated 16–49
SAY "&"&cvar" is "&&cvar
END /*do*/
END /*do*/
WHEN $NCL THEN DO
SAY "&MDO. = "&mdo.
/* How many fields are there? */
ASSIGN OPT=MDOCOUNTS VARS=&mdocounts,
FROM MDO=&mdo.datalist.data
DO &cvar = 1 TO &mdocounts
SAY "&"&cvar" is "&mdo.datalist.data{&cvar}
END /*do*/
END /*do*/
OTHERWISE
NOP
END /*select*/
END /*do*/
ELSE
SAY "This message does not have a USERMDO"
MSGCONT
END /*do*/
END zex1620n
This procedure is designed to loop forever to trap messages arriving at an OCS
window. The MSGREAD verb specifies an MDO variable when reading a
message. This allows you to read the whole message into the &$MSG. MDO
variable and, if the message contains an enclosed MDO variable, to automatically
read the enclosed MDO variable into the MDO variable specified by the
MSGREAD verb. The message is analyzed to determine whether it contains an
enclosed MDO variable. Depending on the map used to map the enclosed MDO
variable, information about the message is then displayed on the screen.
2. Install ZEX1620N as your active MSGPROC procedure, using the following
command from the OCS command input line:
PROFILE MSGPROC=ZEX1620N
3. Type the second NCL procedure as shown, calling it ZEX1621N:
zex1621n: PROCEDURE
/* Sends text only */
WRITE DATA=a b c
END zex1621n
4. Execute ZEX1621N from the OCS command input line by using the following
START command:
START ZEX1621N