Enform Plus Reference Manual

Statements
Enform Plus Reference Manual422684-001
4-38
OPEN Statement
OPEN Statement
The OPEN statement accesses the dictionary record description. The syntax of the OPEN
statement is:
record-name and record-name1
are the names of dictionary record descriptions.
record-name2
is a name that you supply for the copy of record-name1. record-name2 can
be the name of a dictionary record description.
Specifying an OPEN statement does not actually open a physical file; rather, the OPEN
statement causes Enform Plus to access the dictionary record description of the file. One
OPEN statement can open several record descriptions. Enform Plus stores the record
description in the internal table. The record description remains open until one of the
following occurs:
A CLOSE statement clears the record description.
Either a DICTIONARY statement or ?DICTIONARY command clears the entire
internal table.
The current Enform Plus session ends.
Using OPEN AS COPY OF
The OPEN AS COPY OF statement is useful when a record description is designed so
that records within a file relate to other records within the same file. Because LINK
statements associate record descriptions only with different record names, the OPEN AS
COPY OF statement refers to the same record description by a different record name.
Note that although the OPEN AS COPY OF statement opens record-name2, you must
open record-name1 before specifying this statement. Note also that record-name1 cannot
be specified as record-name2 in another OPEN AS COPY OF statement.
If you want to assign record-name2 to a file other than the file specified in the
dictionary for record-name1, you must use an Enform Plus ?ASSIGN command or
a TACL ASSIGN command to assign record-name2. An assignment of record-
name1 does not apply to record-name2.
OPEN { record-name }
{ record-name2 [ AS ] COPY [ OF ] record-name1 }, ... [ ; ]