NET/MASTER Network Control Language (NCL) Programmer's Guide
User-Defined Maps
Standard and User-Defined Maps
106160 Tandem Computers Incorporated 11–31
field (DEPTYPE), each of which is at the same level. The DEPNUM group has two
fields (REGNUM and BRANCHNUM). The DEPTYPE field defines an enumerated
data type.
The EMPDEF group is defined using four previously defined data structures (NAME,
ADDRESS, DATE, and DEPARTMENT). DATE is used twice: first, for EMPBDAY;
second, for EMPPAY. The value of PAYPERIOD determines the number of
occurrences (12) of the EMPPAY field.
The schema defines one record (EMPREC). This defines the data structure of records
in a key-sequenced file ($DATA2.UDDL.EMPFILE), which is the database file that
holds employee records. The data structure is defined using the EMPDEF group.
Step 2. Creating a DDL Data Dictionary
The second step in creating a user-defined map is creating a DDL data dictionary from
the DDL source schema file. The DDL data dictionary consists of 14 prenamed and
predefined files. The DDL data dictionary is used as the input for creating a
user-defined map.
For example, the following command runs the DDL compiler to create two types of
output: a DDL data dictionary and output that FUP can use to create an Enscribe file:
DDL /IN ZEX11051/ DICT, FUP FUPSRC
The following listing shows partial results of the command, which is executed from
the $DATA2.UDDL subvolume:
…
0 ?DICT, FUP FUPSRC
Dictionary created on subvol $DATA2.UDDL.
*** WARNING *** This dictionary is NOT audited
Dictionary opened on subvol $DATA2.UDDL for update access.
Output source for FUP is opened on $DATA2.UDDL.FUPSRC
…
45 RECORD emprec.
46 FILE IS "$DATA2.UDDL.EMPFILE" KEY-SEQUENCED.
47 DEF IS empdef.
48 KEY IS emprec.empcode.
49 END
Record EMPREC size is 172 bytes.
Record EMPREC added to dictionary.
FUP output produced for EMPREC.
…
Of most significance in this partial listing, because it is going to be used as the input to
create the EMPREC user-defined map later in this section, is that the record EMPREC
is added to the DDL data dictionary.