User guide

Example ENFORM Programs
058058 Tandem Computers Incorporated D–3
A new report item is created with the arithmetic expression (price * quantity). A
subtotal is printed for the new item, assuming OVER order.ordernum.
The CUM OVER clause prints the cumulative values of the arithmetic expression for
each group.
The WHERE clause restricts the records that contribute to the report.
?DICTIONARY $mkt.dictry
SET @SUBTOTAL-LABEL TO "SUBTOTAL";
OPEN order, odetail, parts;
LINK order TO odetail VIA ordernum,
parts TO odetail VIA partnum;
LIST BY order.ordernum,
parts.partnum AS M
9 999
,
quantity HEADING "QTY",
price,
(price * quantity) AS M
Z,ZZZ,999
.
HEADING "PRICE * QTY", SUBTOTAL, TOTAL,
(price * quantity)
CUM OVER order.ordernum AS M
Z,ZZZ,999
.
HEADING "ACCUMULATION/BY ORDER",
WHERE order.ordernum > 60;