ENFORM Reference Manual

Rules for Naming User Defined Elements
ENFORM Language Elements
058057 Tandem Computers Incorporated 3–7
A field name requires as much qualifying as necessary to uniquely identify the field to
ENFORM. The necessary qualification might be as simple as combining the field
name with the record name or group name. It might require combining the field name
with both a group name and a record name or with two group names. Consider the
record descriptions shown in Figure 3-2.
Figure 3-2. Records with Duplicate Field Names
RECORD stock-items. RECORD shelf-items.
FILE IS "stock" KEY-SEQUENCED. FILE is "shelf" KEY-SEQUENCED.
02 depot-num PIC 99. 02 dept-num PIC 99.
02 cont-num PIC 99. 02 dept-name PIC X(10).
02 erasers. 02 cont-num PIC 99.
05 ink PIC 99. 02 pens.
05 gum PIC 99. 05 b-point PIC 99.
05 pink PIC 99. 05 felt-tip PIC 99.
02 ink-pens. 02 erasers.
05 felt-tip PIC 99. 05 ink PIC 99.
05 b-point PIC 99. 05 gum PIC 99.
05 fountain PIC 99. 05 gray PIC 99.
If both the stock-items and shelf-items record descriptions are open, ink must be
qualified. To qualify ink within shelf-items, one of the following must be entered:
ink OF erasers OF shelf-items
shelf-items.erasers.ink
Primary Key References The records in data base files can be uniquely identified by the value of a primary key.
For data base files with key-sequenced file structure, the primary key is part of the
record. For data base files with relative, unstructured, or entry-sequenced file
structure, the primary key is not part of the record. Primary keys can be referenced in
two forms:
KEY OF
record-name
or
record-name
.KEY
The form record-name.KEY can appear for only one relative, entry-sequenced, or
unstructured file per query.