ENFORM User's Guide

Connecting Record Descriptions to Form New Relationships
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–23
2. Link the record descriptions and their copies. The first LINK OPTIONAL
statement ensures that the name of a part appears in the report even if it has no
components. The second LINK OPTIONAL statement ensures that the name of a
main component appears in the report even if it has no secondary components.
LINK newpart.p-no TO OPTIONAL component.part-no;
LINK component.compon-no TO OPTIONAL cp-1.part-no;
LINK component.compon-no TO npart-1.p-no;
LINK cp-1.compon-no TO npart-2.p-no;
3. List the part name, the names of its main components, and the names of its
secondary components.
LIST BY newpart.p-name HEADING "PART",
BY npart-1.p-name HEADING "MAIN/COMPONENTS",
npart-2.p-name HEADING "SECONDARY/COMPONENTS";
A sketch of the links in this query appears as:
newpart component cp-1
npart-1 npart-2
The report produced is:
MAIN SECONDARY
PART COMPONENTS COMPONENTS
-------------------- -------------------- -----------------
16 INCH WORK CENTER PORTABLE WORK TABLE CASTERS
BRACES
VISE
3 AMP UNIVER MOTOR
BAND SAW 3 AMP UNIVER MOTOR
BAND SAW BLADE
ROUTER AND SHAPER GD
BAND SAW BLADE
... ... ...
RADIAL SAW BLADE
RADIAL SAW CENTER RADIAL SAW RADIAL BLADE GUARD
3 AMP UNIVER MOTOR
RADIAL SAW BLADE
SAW LEG STAND CASTERS
BRACES
... ... ...