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

The ASSIGN and DROP Verbs
Working With Mapping Services
106160 Tandem Computers Incorporated 10–41
Using the map $NCL allows you to assign data from ordinary variables to an MDO
variable and from an MDO variable to ordinary variables as required. This allows you
to easily manipulate data to and from mapped user databases (UDBs), which store
ordinary variables in a form mapped by the map $NCL. The following example
illustrates how to do so:
zex1017n: PROCEDURE
/* Transfers data: MDO variables to ordinary variables using $NCL */
&var1 = One ; SAY "&VAR1 is "&var1
&var2 = Two ; SAY "&VAR2 is "&var2
&var3 = Three; SAY "&VAR3 is "&var3
SAY "Transferring from ordinary variables to MDO variables"
ASSIGN MDO=&abc2. MAP=$NCL FROM VARS=&var*
SAY "&ABC2.DATALIST.DATA{1} is "&abc2.datalist.data{1}
SAY "&ABC2.DATALIST.DATA{2} is "&abc2.datalist.data{2}
SAY "&ABC2.DATALIST.DATA{3} is "&abc2.datalist.data{3}
SAY "Transferring from an MDO variable to ordinary variables"
ASSIGN VARS=&xyz* FROM MDO=&abc2.
DO &i = 1 TO &SYS.VARCNT
SAY "&XYZ"&i" is "&xyz&i
END
END zex1017n
The following screen shows the results of executing the procedure:
(07:42) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX1017N
&VAR1 is One
&VAR2 is Two
&VAR3 is Three
Transferring from ordinary variables to MDO variables
&ABC2.DATALIST.DATA{1} is One
&ABC2.DATALIST.DATA{2} is Two
&ABC2.DATALIST.DATA{3} is Three
Transferring from an MDO variable to ordinary variables
&XYZ1 is One
&XYZ2 is Two
&XYZ3 is Three
NNM1005 START ZEX1017N PROCESSING COMPLETE. NCLID 001048
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The screen shows that data from the ordinary variables &VAR1, &VAR2, and &VAR3
is placed into separate fields in a mapped user database (UDB) record, not
concatenated into a single string. It shows that you can read the data from a mapped
UDB record into ordinary variables.