User guide

Example ENFORM Programs
D–10 058058 Tandem Computers Incorporated
The SUPPRESS clause limits the printing of records for all items out of stock, but does
not limit these records from contributing to the totals. In this example the inventory
total is negative.
?DICTIONARY $mkt.dictry
OPEN parts;
LIST location,
price AS M
ZZZZZZ
.
partnum AS M
9 999
,
partname,
inventory TOTAL CENTER,
(IF inventory GE 0 THEN inventory ELSE BLANK) TOTAL
HEADING "AVAIL/STOCK" AS M
ZZZ
CENTER,
WHERE (partname BEGINS WITH "SY")
OR (partname BEGINS WITH "LP"),
SUPPRESS inventory EQUAL -999 THRU 0;
Report:
Part AVAIL
LOCATION PRICE Number PARTNAME INVENTORY STOCK
-------- ------- ------ ----------------- --------- ----
J87 92000. 0 212 SYSTEM 192KB CORE 7 7
B78 87000. 0 244 SYSTEM 192KB SEMI 3 3
L98 11500. 5 502 LP 300 LPM 6 6
--------- -----
--------- -----
-1 16
The following program uses the HEADING clause to indicate the fourth column of the
heading. The WHERE clause uses the pattern match logical expression to select only
records with a blank value in column four of branch.
?DICTIONARY $mkt.dictry
OPEN branch;
LIST branchnum,
branchname HEADING "BRANCH NAME/...*...........",
WHERE (branchname EQUAL [ 3 " " -]);
Report:
BRANCH NAME
BRANCHNUM ...*............
--------- ----------------
1 NEW YORK
2 NEW JERSEY
3 ST. LOUIS
2 LOS ANGELES
3 SAN FRANCISCO