User guide

Establishing the Query Environment
Developing an ENFORM Query
3–2 058058 Tandem Computers Incorporated
Establishing the Query
Environment
Establishing the query environment is the first step in developing a query. Table 3-1
shows the ENFORM statements and commands that establish the query environment.
If your dictionary resides on your current volume and subvolume, the OPEN
statement is the only statement or command that is required. If your dictionary
resides on a different volume or subvolume, either the DICTIONARY statement or the
?DICTIONARY command is also required.
Table 3-1. Statements and Commands Used to Establish the Query Environment
Statement Command Function
DICTIONARY ?DICTIONARY Identifies the volume and subvolume on which the dictionary
resides.
OPEN Identifies the record descriptions used in the query.
?ASSIGN Assigns a record description to a different physical file.
DECLARE Defines user elements.
SET Initializes user elements and resets operational variables.
Identifying the Dictionary To identify the volume and subvolume on which your dictionary resides, use one of
the following:
The dictionary parameter in the ENFORM command.
The DICTIONARY statement.
The ?DICTIONARY command.
If the dictionary is not identified, ENFORM assumes it resides on your current volume
and subvolume.
If the dictionary is identified in the ENFORM command and you want to change
dictionaries, use either the DICTIONARY statement or the ?DICTIONARY command.
For example, the following DICTIONARY statement indicates to ENFORM that you
want change dictionaries from the one residing on $mkt.sample to the one residing on
$data.test:
:ENFORM $mkt.sample
...
>DICTIONARY $data.test;
Identifying Record
Descriptions
Use the OPEN statement to identify the record descriptions used in your query. When
the OPEN statement is issued, the query compiler obtains the record description of the
identified record from the dictionary and stores this information in its internal table.
Figure 3-1 shows the effect of an OPEN statement that identifies the parts record
description.