NET/MASTER Network Control Language (NCL) Programmer's Guide
The ASSIGN and DROP Verbs
Working With Mapping Services
106160 Tandem Computers Incorporated 10–49
The following MSGPROC NCL procedure reads a message and uses the ASSIGN verb
to obtain the names of the fields that are present:
zex1022n: PROCEDURE
 /* MSGPROC procedure to trap a message and display */
 /* field names in an MDO variable */
 DO FOREVER
 MSGREAD VARS=&word*
 IF &word1 = "TEST" THEN DO
 ASSIGN OPT=MDOFIELDS VARS=&mdofields*,
 FROM MDO=&$MSG.MSGATTR.FLAGS
 SAY "Fields under &$MSG.MSGATTR.FLAGS are"
 DO &i = 1 TO &SYS.VARCNT
 SAY &mdofields&i
 END
 MSGCONT
 END
 ELSE
 MSGCONT
 END
END zex1022n
After following the steps outlined earlier in this section to type this NCL procedure
and install it as your active MSGPROC procedure, execute the ZEX1002N NCL
procedure to send a message to your OCS window. The following screen shows the
results of executing ZEX1002N with MSGPROC active:
 (07:55) --------------------- OPERATOR CONTROL SERVICES ----------------------
 PROFILE MSGPROC=ZEX1022N
 NNM0393 MSGPROC PROCESSING ACTIVATED
 NNM0357 PROFILE HAS CHANGED
 START ZEX1002N
 TEST An OPER NRD message
 Fields under &$MSG.MSGATTR.FLAGS are
 CLEAR
 CMDECHO
 CMDLINE
 CONVPFK
 EXPRESS
 FIRST
 INTQ
 LAST
 LOG
 LOGP
 MSG
 MSGP
 NRD
 NRDRET
 SCAN
 MSG QUEUED ------------------ NonStop NET/MASTER D30 ---------------- --------
 M=>










