Link Optional Statement Considerations; Rules For Using Link Optional Statements - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

LINK OPTIONAL Statement
Considerations
Note
When you establish a link by specifying the LINK OPTIONAL statement, you preserve
all of the information from the data file whose record description is specified on the
left side of the statement. You preserve this information because ENFORM builds the
logical records for such a link in a different manner than it does for a link established
by a LINK statement. For example, suppose that you entered the following LINK
OPTIONAL statement:
LINK employee TO OPTIONAL branch VIA branchnum;
This statement causes ENFORM to build:
A logical record description that consists of fields from both employee and branch.
One logical record for each matching employee and branch record. (Each logical
record contains field values from both records.)
One logical record for each employee record for which there is not a corresponding
branch record. ENFORM builds this logical record by supplying blanks for the
fields in the logical record that correspond to the branch record description.
Because of the way that ENFORM builds the logical records for this type of link, the
order in which you enter the record description names is important. For example:
LINK employee TO OPTIONAL branch VIA branchnum;
is not the same as:
LINK branch TO OPTIONAL employee VIA branchnum;
The first LINK OPTIONAL statement preserves the information in the employee
records; the second preserves the information in the branch records.
If you specify a LINK OPTIONAL statement for record descriptions that are associated with data files
containing variable length records, the linking field must be present in all of the records from both data
files. If the linking field is not present, a sort operation might fail.

Rules for Using LINK OPTIONAL Statements

When you include LINK OPTIONAL statements in your query specifications,
ENFORM requires you to adhere to certain rules for all of the links that affect your
query. These rules exist to eliminate the possibility of ambiguous links and to
eliminate links that are not supported by the current query processor.
058057 Tandem Computers Incorporated
Statements
LINK Statement
4–27

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents