ENFORM User's Guide

Connecting Record Descriptions to Form New Relationships
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–13
Normally, ENFORM produces target records by evaluating all of the “terms” in the
WHERE clause and selecting only those logical record occurrences that satisfy all the
“terms.” If your query specifications contain both a WHERE clause and LINK
OPTIONAL statements, ENFORM might not use every “term” in a converted WHERE
clause to evaluate every given logical record occurrence. Before ENFORM uses a
“term” to evaluate a given logical record occurrence, ENFORM examines both the
“term” and the logical record occurrence. ENFORM determines whether the “term”
references a record description that is “non-contributing” for the given logical record
occurrence. For a given logical record occurrence, a record description is “non-
contributing” if the logical record occurrence does not contain any data values from
the data file associated with the record description. (Refer to the ENFORM Reference
Manual for more information about “non-contributing” record descriptions.)
ENFORM evaluates logical record occurrences by using the “terms” in the converted
WHERE clause as follows:
If all of the record descriptions referenced in a “term” contribute to a given logical
record occurrence, ENFORM uses the “term” to evaluate the logical record
occurrence.
If some of the record descriptions referenced in a “term” are “non-contributing”
for a given logical record occurrence, ENFORM does not use the “term” to
evaluate the logical record occurrence.
For example, suppose you issue the following LINK OPTIONAL statement:
LINK employee TO OPTIONAL region VIA regnum;
If you then enter the following query:
LIST empname, regname, WHERE empnum < 100 AND
regname = "GERMANY";