NET/MASTER Network Control Language (NCL) Programmer's Guide

Components in Mapping Services Processing
Working With Mapping Services
106160 Tandem Computers Incorporated 10–3
Note An MDO variable can be either a stem or compound variable. Refer to the discussion on variables in the
NonStop NET/MASTER NCL Reference Manual for the syntax of variables in general and stem and
compound variables in particular.
NCL Procedures You can write NCL procedures that access and manipulate the data contained in MDO
variables. You access the data in MDO variables in the same way as you access the
data in other compound variables—by naming the segment in the variable that
contains the data you want to access.
Example of Mapping
Services Processing
The following two NCL procedures show how you can easily access the data in an
MDO variable.
The first NCL procedure is a MSGPROC procedure called ZEX1001N. It is designed to
trap messages that begin with TEST and to analyze and display their contents—the
contents of messages are stored in MDO variables.
The second NCL procedure, called ZEX1002N, sends a message, which travels in an
MDO variable, to the OCS window from which ZEX1002N is executed.
To see how these NCL procedures work, follow these steps:
1. Type the first NCL procedure as shown, calling it ZEX1001N:
zex1001n: PROCEDURE
/* MSGPROC procedure to analyze MDO variables */
DO FOREVER
MSGREAD VARS=&word*
IF &word1 = "TEST" THEN DO
SAY "&$MSG.TEXT is "&$msg.text
SAY "&$MSG.MSGATTR.DISPLAY.COLOR is "&$msg.msgattr.display.color
SAY "&$MSG.MSGATTR.DISPLAY.HLITE is "&$msg.msgattr.display.hlite
SAY "&$MSG.MSGATTR.DISPLAY.INTENS is "&$msg.msgattr.display.intens
SAY "&$MSG.MSGATTR.ALARM is "&$msg.msgattr.alarm
SAY "&$MSG.MSGATTR.FLAGS.NRD is "&$msg.msgattr.flags.nrd
SAY "&$MSG.DOMID is "&$msg.domid
SAY "&$MSG.SOURCE.TIME is "&$msg.source.time
SAY "&$MSG.SOURCE.USER is "&$msg.source.user
DO &i = 1 TO &SYS.VARCNT
SAY "Word "&i" of text is "&word&i
END
END
ELSE
MSGCONT
END
END zex1001n
2. Install ZEX1001N as your active MSGPROC procedure using the following
command from the OCS command input line:
PROFILE MSGPROC=ZEX1001N