User guide

Connecting Record Descriptions to Form New Relationships
Developing an ENFORM Query
3–10 058058 Tandem Computers Incorporated
Figure 3-5. Logical Records Built When a Matching Value is Missing
regname manager
Region File
1
29
43
• • •
343
HEADQUARTERS
EAST
GERMANY
• • •
CANADA
empnum empname
Employee File
1
23
32
• • •
43
343
ROGER GREEN
JERRY HOWARD
THOMAS RUDLOFF
• • •
PAUL WINTER
ALAN TERRY
ROGER GREEN
PAUL WINTER
• • •
ALAN TERRY
regname manager
Logical Records
1
43
• • •
343
HEADQUARTERS
GERMANY
• • •
CANADA
empnum empname
1
43
• • •
343
LINK Creates
New Logical Records
Using the LINK OPTIONAL Statement
The major difference between a link established by a LINK statement and a link
established by a LINK OPTIONAL statement is the way that ENFORM builds the
logical record occurrences for the new logical record description. When you specify
the LINK statement, ENFORM builds the logical record occurrences by selecting
matching records from the data files associated with the linked record descriptions.
When you specify the LINK OPTIONAL statement, ENFORM builds a set of logical
records as follows:
ENFORM builds one logical record occurrence for each set of matching record
occurrences. Each of these logical record occurrences contains data values from
both matching record occurrences.
If any record occurrence associated with the record description on the left side of
the LINK OPTIONAL statement does not appear in the set of logical record
occurrences, ENFORM builds a logical record occurrence for that record. In each
of these logical record occurrences, ENFORM supplies null values (blanks) for the
fields that correspond to the record description specified on the right side of the
LINK OPTIONAL statement.