Introduction to ENFORM
Opening a File
Using ENFORM to Produce Complete Reports
058051 Tandem Computers Incorporated 4–3
Starting ENFORM Because ENFORM is a program, you must start it before it can be used to produce a
report. Once a program is started and has control of your terminal, it displays a
prompt character at the left of the next line on the screen. ENFORM uses a greater
than symbol (>).
Generally, the Command Interpreter has initial control of your terminal and you can
start ENFORM by responding to the prompt character with:
ENFORM
The system accesses the ENFORM program, creates an ENFORM process, and
displays the following messages and a prompt character:
ENFORM - T9102
ann
(
ddmmyy
) DATE - TIME :
date
-
time
>
where ann is the level of the executing version of ENFORM and ddmmyy is the release
date of that level.
There are several options that you can specify with the ENFORM command. You can
specify the name of the subvolume that holds the data dictionary that is to be used:
ENFORM $data.dictionary
If no subvolume is specified for the dictionary, ENFORM assumes that the current
default subvolume is to be used.
There are times when you want to start ENFORM, run reports from an edit field, and
exit. In cases like this, you can specify the edit file containing the ENFORM source
code and the output device or file to which the report goes. These two functions are
performed with the in and out parameters of the Command Interpreter command line.
ENFORM /in $data.rpt.rpt1,out $s/ $data.dictionary
This command line causes ENFORM source code to be read from the edit file names
with the in parameter and output to be sent to the spooler, which is named $S in this
system. When the processing is done, but before the report is printed, the ENFORM
process finishes and control returns to the Command Interpreter.
Opening a File Before files can be used by ENFORM, their file descriptions (in the dictionary) must be
identified and opened. File descriptions have the same name as the physical files they
describe. Opening a description involves identifying the files to be used in the query
and initializing pointers to make it possible for a program to read and write a file.
Think of this procedure as being similar to opening a file drawer so that folders can be
put into or taken out of a drawer. Opening a file description is accomplished by
entering an ENFORM OPEN statement and the names of the descriptions to be
opened.
You will get error messages if you try to use a file description that has not been
opened; ENFORM will not be able to find any field names within the file.