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

Opening a UDB or UDB Pair for Access by NCL
Working With Files
12–34 106160 Tandem Computers Incorporated
Figure 12-10. Records in an Unmapped Entry-Sequenced File
ADAMS, J.P. EISENHOWER AV 408 414-5999
JOHNSON, A.B. RED RD 929 43-4345
JONES, P. FIRST ST
BOND, J. ANDERSON DR 408 43-1239
55
15
30
----|----|----|----|----|----|----|----|----|----|----|----|----|
5 101520253035404550 556065
034
The Structure of a Delimited UDB
In a UDB where data is delimited, each field of a record is separated from the next
field by the hexadecimal character 'FF': this is called a field separator.
Note Record keys are not followed by a field separator.
The last nonnull field in a record is followed by one or more field separators. The
number of trailing field separators is set by using the SYSPARMS NCLTRLFF
command. If the value of the SYSPARMS NCLTRLFF command is ONE then the last
nonnull field in a record is followed by one field separator. If the value of the
SYSPARMS NCLTRLFF command is MULT then, if a record is written to a UDB that
contains multiple trailing null variables, one field separator is appended to the record
for each null variable.
Fields, and therefore records, in this type of UDB are of variable length. The length of
a field is determined by the length of data. Fields do not include the field separator
and so the field separator does not contribute to the length of a field. The total length
of any record includes the record key and all field separators.
Two consecutive field separators indicate a null field. A null field is a field of zero
length. This is a field that contained no data when the record was created.
The following example opens a delimited UDB:
FILE OPEN ID=FILEID_1 FORMAT=DELIMITED
Figure 12-11 shows the structure of two records in a UDB where the data is delimited.
Record 1 shows two adjacent null fields. Record 2 shows two non-adjacent null fields.