LINK Statement
Statements
058057 Tandem Computers Incorporated
4–25
LINK Statement
The LINK statement allows you to specify a connecting relationship between
dictionary record descriptions. The syntax of the LINK statement is:
LINK
record-name1 [ TO ] [ OPTIONAL ] record-name2
VIA
field-name
qualified-field-name1 [ TO ] [ OPTIONAL ]
qualified-field-name2
,...[ ; ]
record-name1
and
record-name2
are the names of dictionary record descriptions containing a common field.
field-name
is the name of a field common to both of the record descriptions.
qualified-field-name1
and
qualified-field-name2
are the names of fields uniquely identified as components of the record
descriptions being linked.
OPTIONAL
indicates that ENFORM is to build logical records for the link by including all of
the records from the data file whose record description is specified on the left side
of the LINK OPTIONAL statement. ENFORM includes each record from this data
file even when no matching record is found in the data file whose record
description is specified on the right side of the LINK OPTIONAL statement.
Both the LINK statement and the LINK OPTIONAL statement establish a connecting
relationship, called a link. (You can also establish a link with a WHERE clause.) A
link allows you to view your data in a new manner. When you specify either
statement, ENFORM establishes a new logical record description that consists of fields
from both linked record descriptions. ENFORM then builds a set of logical records for
the new logical record description.
ENFORM builds the set of logical records by selecting records from each of the data
files associated with the linked record descriptions. When you use either statement,
you must identify a field (called a linking field) from each record description.
ENFORM uses the data value of these linking fields to determine which records from
each data file become part of the set of logical records. ENFORM then uses the set of
logical records to build the target records from which your ENFORM output is
produced. If you include a non-linking WHERE clause (refer to Section 5 for a
definition of non-linking WHERE clauses) in a query, such as:
WHERE empnum GT 100
the target records include information only from those logical records that satisfy the
restriction specified in the WHERE clause.
Summary of Contents for ENFORM 058057
Page 6: ...New and Changed Information 058057 Tandem Computers Incorporated v...
Page 18: ...Preface xvi 058057 Tandem Computers Incorporated This page left intentionally blank...
Page 19: ...Preface 058057 Tandem Computers Incorporated xvii...
Page 269: ...Glossary Glossary 4 058057 Tandem Computers Incorporated This page left intentionally blank...