User guide

Connecting Record Descriptions to Form New Relationships
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–17
Report:
Part
Number PARTNAME SUPPNUM SUPPNAME
------ ------------------ ------- ---------
212 SYSTEM 192KB CORE 1 TANDEM COMPUTERS
244 SYSTEM 192KB SEMI 1 TANDEM COMPUTERS
1403 PROC 96KB SEMI 1 TANDEM COMPUTERS
... ... ...
7102 CABINET LARGE 10 STEELWORK INC
7301 POWER MODULE 1 TANDEM COMPUTERS
Using a WHERE clause to link record descriptions with conditional operators other
than EQUAL is also possible.
Combining Links ENFORM allows you to combine links initiated by LINK statements with links
initiated by LINK OPTIONAL statements or links initiated by a WHERE clause. If you
include LINK OPTIONAL statements in your query specifications, however, you must
follow the rules described in the ENFORM Reference Manual.
The following paragraphs show examples of queries for which multiple links are
necessary. Many of these examples also show sketches of the links, where:
represents a link initiated by a LINK OPTIONAL statement.
represents a link initiated by a LINK statement or a WHERE clause.
A sketch of the links that affect a query can often help you find:
“silly” or unnecessary links. If, for example, your query returns unexpected
results, you can use the ?SHOW LINK command to determine which session-wide
links affect your query. If you then sketch all the links (including any links
initiated by a WHERE clause), you might discover the reason that you have
obtained the unexpected result. (For example, you might have specified a link that
unnecessarily restricts the target records returned for the query.)
a link that violates one of the rules specified for the LINK OPTIONAL statement.
If ENFORM returns an error message that indicates you have specified an illegal
link, a sketch of the links often helps you find the illegal link.