Introduction to ENFORM
Statements, Clauses, and Commands
Using ENFORM—The Basics
2–8 058051 Tandem Computers Incorporated
Statements ENFORM statements provide the basic query specifications of the program to be
executed. The main ENFORM statement is LIST, which specifies what information
should appear on a report, and prints the formatted report to (usually) a terminal or
printer; for example,
ENFORM /OUT
name of file / name of dictionary subvolume
>. . . . . . . . . . .
> LIST parts;
will select and print all data items in the parts file. The report will be printed on the
output device specified by the out parameter.
Alternatively, entering
>LIST partname, partnum, price;
in place of LIST parts, in the preceding example, will select and print the named
items: part names, part numbers, and price from the parts files.
Additional ENFORM statements establish the query environment (specific conditions
for processing the query) and provide some basic report formatting specifications.
The most often used environment statements are OPEN, which specifies file
descriptions for the files to be processed by the query, and LINK, which specifies a
connecting relationship between files. For example,
>OPEN parts, fromsup;
>LINK parts to fromsup VIA partnum;
will cause ENFORM to access the dictionary description of the parts and fromsup files
and to produce a new relation that connects the files for each partnum that is identical
in both file descriptions.
Typical report formatting statements are TITLE, which prints the title you specify at
the top of each page of the report and SUBTITLE, which prints a subtitle, immediately
following the title, at the top of each page. For example,
>TITLE "Inventory Report" CENTER;
>SUBTITLE "XYZ Inc." CENTER;
will print and center the words “Inventory Report” on one line followed by “XYZ Inc.”
on the next line at the top of each page for all reports produced during the session.
Summary of Statements By entering four of the preceding statements as follows:
>OPEN parts;
>TITLE "Inventory Report" CENTER;
>SUBTITLE "XYZ INC." CENTER;
>LIST partname, partnum, price;
you can use ENFORM to produce a report like Figure 2-7.