ENFORM User's Guide
Establishing the Query Environment
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–3
Figure 3-1. Effect of an OPEN Statement
Query Compiler
Report Writer
parts record
description
odetail record
description
Internal table
parts record
description
Dictionary
• • •
:ENFORM
>OPEN parts;
Note that the OPEN statement does not actually open the physical file in which the
parts record occurrences are stored.
Use OPEN AS COPY OF when a record description is designed so that record
occurrences stored in a physical file relate to other record occurrences stored in the
same physical file. OPEN AS COPY OF allows you to use either a LINK statement or a
linking WHERE clause (both are described later in this section) to establish a linking
relationship between the record occurrences. Establishing such a linking relationship
is impossible without using OPEN AS COPY OF because ENFORM requires that a
LINK statement or a linking WHERE clause specify two different record names.
Consider the record description shown in Figure 3-2.
Figure 3-2. Record Description for OPEN AS COPY OF
RECORD employ.
 FILE IS $mkt.sample.employ KEY SEQUENCED.
 02 empl-no PIC 9(4).
 02 emp-name PIC X(18).
 02 dept.
 05 reg-num PIC 99.
 05 branch-num PIC 99.
 02 salary PIC 999999.
 02 mgr-id PIC 9(4).
 KEY IS empl-no.
 KEY "en" IS empl-name.
 KEY "dp" IS dept.
END










