Introduction to ENFORM

Controlling the Appearance of the Report
Using ENFORM to Produce Complete Reports
058051 Tandem Computers Incorporated 4–11
To produce the report in Figure 4-9, using LINK instead of WHERE, you enter:
>OPEN fromsup, supplier;
>LINK fromsup TO supplier VIA suppnum;
>LIST BY fromsup.suppnum,BY suppnum, partnum, partcost;
to generate the report in Figure 4-11.
Figure 4-11. Connecting Files Using LINK
SUPPNUM SUPPNAME PARTNUM PARTCOST
1 TANDEM COMPUTERS 212 92000.00
244 87000.00
6201 5800.00
7301 2400.00
6 INFORMATION STORAGE 4102 14500.00
4103 24500.00
10 STEELWORK INC 7102 6800.00
In this example, the report is generated from a new logical description that has been
produced by taking the value of the suppnum field of each record in the fromsup file
and searching for an equivalent value in the suppnum fields of all records in the
supplier field. Whenever there is a match, a record connecting all fields in both file
records is produced for the logical description.
Because connected file descriptions occupy space in the internal table, they should be
cleared whenever you are through using them. One way to clear them is to use the
DELINK statement.
DELINK syntax looks like LINK syntax. For example, entering:
DELINK fromsup TO supplier VIA suppnum;
will clear the relationship established by:
LINK fromsup TO supplier VIA suppnum;
See the ENFORM Reference Manual for more information on the commands used to
clear ENFORM internal tables.
Controlling the
Appearance of the
Report
ENFORM has a number of defaults that automatically control the appearance of
information on the reports. These defaults control such things as headings for the
columns, spacing between the columns, and alignment of data items within a column.
You can override these defaults by using the ENFORM clauses HEADING, SPACE,
and CENTER. Each of these clauses is discussed with examples in the following
pages. The examples show reports that use the parts file, which has the following
fields:
partnum partname inventory location price