Getting Started with TRANSACT (32247-90007)
Chapter 1 33
Getting Started
Reporting from Multiple Datasets
14 Replace the FORMAT and OUTPUT verbs with a FIND verb which
performs a routine to display the data.
18 DISPLAY displays the information. The TABLE option specifies that we
want Transact to print the headings at the start of each new page.
The items to be reported are specified as a part of the DISPLAY verb.
Our report now looks like this:
Figure 1-20. Report created by DISPLAY(TABLE)
Data selection can also be specified programmatically by using Transact’s IF verb. This
verb is very similar in functionality to the IF verb in languages such as COBOL and
Pascal.
The following program illustrates how IF can be used to select a report of order details by
order line, if the order line generates sales of over $1000. This program brings into play a
fourth dataset, PARTS. It also changes the order in which data is retrieved.
NAME: ORDER-NO: LINE-NO: PART-NUMBER: QUANTITY:
Able-1 Answering po1001 10 p121 75
Able-1 Answering po1001 20 p123 150
Able-1 Answering po1002 10 p122 50
Able-1 Answering po1002 20 p124 10
Able-1 Answering po1002 30 p127 243
Able-1 Answering po1003 10 p121 10
Able-1 Answering po1004 10 p122 20
Grand Depression po2003 10 p126 50
END OF PROGRAM
: