ENFORM Reference Manual

Review of Rules for the LINK OPTIONAL Statement
LINKS and the LINK OPTIONAL Statement Rules
058057 Tandem Computers Incorporated C–11
The following query specifications show a valid method of generating a “double”
exception report:
OPEN employee, region, jobs;
LINK employee TO OPTIONAL region VIA regnum;
LINK employee TO OPTIONAL branch VIA branchnum;
LIST empname, employee.regnum, employee.branchnum
SUPPRESS WHERE employee.regnum = region.regnum OR
employee.branchnum = branch.branchnum;
A sketch of these links appears as follows:
regionemployee
branch
The LINK OPTIONAL statements establish the only links for this query. Although the
SUPPRESS clause contains a WHERE phrase, this WHERE phrase does not establish a
link. (If the WHERE phrase did establish a link, the links in this query would be
illegal.)