NET/MASTER Network Control Language (NCL) Programmer's Guide
User-Defined Maps
Standard and User-Defined Maps
11–34 106160 Tandem Computers Incorporated
Before you attempt to use the user-defined map, it is useful to confirm that the data
structures defined using DDL correspond to the data structures you expect in the
user-defined map. The following NCL procedure lets you display the groups and
fields in a user-defined map.
zex1104n: procedure
/* Displays a user-defined map */
ASSIGN MDO=&x. MAP=&1
CALL show_map( 0, "" ) SHARE &x.
show_map: PROCEDURE
&nspaces = &1
&piece = &2
&spaces = COPIES( " ", &nspaces )
IF &piece \== "" THEN
&piecedot = &piece"."
ASSIGN OPT=MAPFIELDS ARGS FROM MDO=&x.&piece
DO &i = 1 TO &SYS.VARCNT
&y = &piecedot || &&i
ASSIGN OPT=MAPFIELDS VARS=&var FROM MDO=&x.&y
IF &SYS.VARCNT = 0 THEN &type = Field
ELSE &type = Group
SAY &spaces || &type &&i
CALL show_map( &nspaces + 2, &y ) SHARE &x.
END /*do*/
end show_map
end zex1104n
The name of the map is entered as the first parameter.
The following screen shows the results of executing the procedure to display the
groups and fields in the EMPREC map (EMPREC is entered as the first parameter):
(15:25) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX1104N EMPREC
Group EMPADDR
Field CITY
Field STATE
Field STREET
Field ZIP
Group EMPBDAY
Field DAY
Field MONTH
Field YEAR
Field EMPCODE
Group EMPDEP
Group DEPNUM
Field BRANCHNUM
Field REGNUM
Field DEPTYPE
Field DEPTYPE#
Group EMPNAME
Field FIRSTNAME
Field LASTNAME
Field MIDINIT
MSG QUEUED ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>