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

User-Defined Maps
Standard and User-Defined Maps
106160 Tandem Computers Incorporated 11–29
Creating a User-Defined
Map
To create a user-defined map, follow these steps:
1. Create a DDL source schema file using DDL statements.
2. Create a DDL data dictionary using the source schema file as input.
3. Create a map definition using the DDL data dictionary as input and add the map
definition to the NonStop NET/MASTER MS map file.
This subsection illustrates these steps by using a source schema file that defines data
structures for describing employee information. The result of these steps is the
addition of a user-defined map, called EMPREC, to the map file. This user-defined
map allows an NCL process to access substructures such as employee code, name,
address, birthday, sex, department, and pay period.
Note The following discussion does not attempt to illustrate the complexities of DDL. It assumes that you know
how to use DDL and concentrates on the tasks you need to know to create a user-defined map. For
detailed information on DDL, refer to the Data Definition Language (DDL) Reference Manual.
Step 1. Creating a DDL Source Schema File
The first step in creating a user-defined map is creating a DDL source schema file.
The source schema file consists of DDL statements that define and describe DDL data
structures. The source schema file is used as the input for creating a DDL data
dictionary, which is used as the input for creating a user-defined map. The DDL
source schema file can contain both definitions (defined using the DDL DEFINITION
clause) and records (defined using the DDL RECORD clause); you can create maps
from either or both sources of input.
From a RECORD, you can create a map and the definition for creating a file, which
holds records with data structures that the map can interpret. From a DEFINITION,
you can create a map only. Therefore:
To read records from and write records to an Enscribe file that is created by an
external application, either a DEFINITION or RECORD is reasonable.
To write records to a new Enscribe file created by NonStop NET/MASTER MS for
later access by an external application, a RECORD is likely to be more applicable
input.
To send messages to and receive messages from an external program, such as a
Pathway server class, a DEFINITION is likely to be sufficient input.
The following example shows a source schema file, called $DATA2.UDDL.ZEX11051,
that defines data structures for describing employee information:
CONSTANT payperiod VALUE IS 12.
DEF name.
02 lastname PIC X(12).
02 firstname PIC X(12).