ENFORM User's Guide

Example ENFORM Programs
D–12 058058 Tandem Computers Incorporated
Report:
Part MAXIMUM
ORDERNUM Number QTY PRICE PRICE * QTY PRICE * QTY
-------- ------ --- --------- ----------- -----------
51 1-403 4 22000.00 88,000. 269,500.
2-001 4 1500.00 6,000.
2-002 4 1000.00 4,000.
2-003 4 500.00 2,000.
2-403 16 9600.00 153,600.
3-103 5 10500.00 52,500.
3-302 1 2800.00 2,800.
4-103 11 24500.00 269,500.
5-103 1 8000.00 8,000.
5-505 1 42000.00 42,000.
6-301 2 2900.00 5,800.
6-302 2 4300.00 8,600.
6-402 8 1500.00 12,000.
7-102 1 68000.05 68,000.
-----------
SUBTOTAL 722,800.
66 0-244 1 87000.00 87,000. 92,000.
1-403 3 22000.00 66,000.
2-001 5 1500.00 7,500.
... ... ... ...
7-301 2 2400.06 4,800.
-----------
SUBTOTAL 720,200.
-----------
-----------
1,443,000.
The following program resets the Option Variable @SUBTOTAL-LABEL. The new
value appears in place of the default asterisk (*).
Two user variables, sumval and cntval, are declared. They are both assigned values in
the LIST statement. The sumval user variable uses a mask format in the DECLARE
statement to assign a default display format. The cntval user variable uses an I format
in the DECLARE statement to assign a default display format.
Three record descriptions are linked together, creating new logical records. The BY
clause groups the records on ordernum. Notice that ordernum and partnum require
qualification, because they appear in more than one record description.
The AS clause uses the mask format to print partnum with a hyphen. The HEADING
clause overrides the default quantity heading, creating a narrower column width in the
report.