Dictionary Database Structure
Data Definition Language (DDL) Reference Manual — 426798-002
D -45
Definition and Record Storage in the Dictionary
•
VERSION-CONSTANT
−
if the version number was specified as a constant, this
field contains the object number of the constant; otherwise, it is 0.
•
BEG-ELEMENT
−
contains the element number from DICTOBL for the first element
specified in the sequence of fields with this version.
•
END-ELEMENT
−
contains the element number from DICTOBL for the last element
in the sequence of fields with this version.
•
VERSION-TEXT
−
contains the 3-character version number in the form ann, in
which a is a letter of the alphabet and nn is a 2-digit number.
Definition and Record Storage in the
Dictionary
The first part of this appendix discusses how the dictionary database files are
structured. This subsection shows how definitions and records are stored in the
dictionary. For simplicity, only a subset of the actual dictionary fields is shown. The
focus is on primary and alternate key fields, because these fields show how the files
are related.
A schema consisting of two objects, a definition and a record, is used to construct a
sample dictionary. The sample schema is shown in
Figure D-1
.
Dictionary Definition File
DICTDDF, an unstructured file, contains only one record. The two most important fields
in this file for record and definition storage are NEXT-OBJ and NEXT-TEXT-ID.
NEXT-OBJ is used by the DDL compiler to assign object numbers to objects as they
are entered into the dictionary. NEXT-OBJ has an initial value of 1. When an object is
Figure D-1. Sample Dictionary Schema for a Definition and a Record
DEF partname PIC X (18)
HEADING “Part/Name”.
RECORD parts.
FILE IS “$data.sales.parts” KEY-SEQUENCED
02 PARTNAME TYPE *.
02 inventory PIC 999 COMP
VALUE ALL ZEROES
02 location PIC XXX
88 san-francisco UPSHIFT
VALUE “SFO”.
KEY IS parts.partname.
END