ENFORM User's Guide

Connecting Record Descriptions to Form New Relationships
Developing an ENFORM Query
3–16 058058 Tandem Computers Incorporated
Establishing Links for the
Current Query
You can establish a link that applies only to the current query by including a WHERE
clause in either a LIST or FIND statement. If you want to establish a link with a
WHERE clause, at least one of the terms of the WHERE clause must reference two
record descriptions. (Refer to the ENFORM Reference Manual for an explanation of the
terms of a WHERE clause). When you establish such a link, the link applies only to the
query of which it is a part. For example, in the following query the WHERE clause
links parts to fromsup:
OPEN parts, fromsup;
LIST parts.partnum,
partname,
suppnum,
WHERE parts.partnum EQ fromsup.partnum;
Report:
Part
Number PARTNAME SUPPNUM
------ ------------------ -------
212 SYSTEM 192KB CORE 1
244 SYSTEM 192KB SEMI 1
1403 PROC 96KB SEMI 1
... ... ...
6603 TERM HARD COPY 2
7102 CABINET LARGE 10
7301 POWER MODULE 1
If you issue another query later in the same session, the link established by the
WHERE clause is no longer in effect. Suppose, for example, after entering the
preceding query, you enter:
LIST parts.partnum, partname, fromsup.suppnum;
Since the link established by the WHERE clause in the preceding query no longer
exists, ENFORM displays an error message stating that at least one record has no link
relating it to any other record.
You can use a WHERE clause to link more than one record description. For example,
in the following query, the WHERE clause temporarily links parts, fromsup, and
supplier:
OPEN parts, fromsup, supplier;
LIST parts.partnum, partname, fromsup.suppnum, suppname,
WHERE parts.partnum EQ fromsup.partnum
AND fromsup.suppnum EQ supplier.suppnum;