Getting Started with TRANSACT (32247-90007)
Chapter 1 29
Getting Started
Reporting from Multiple Datasets
Figure 1-17. Program to Report from Three Datasets
3 MOVE sets up the match value that we want for selection. We want to
select open orders only.
4 SET(MATCH) establishes the match criterion for the data retrieval verb
FIND (in line 5). The match element is order-status and the match value is
“o”.
5 The FIND verb retrieves all records from the orderhead set that match the
selection criterion of being an open order. The LIST=(@) specifies that all
1 system ex6,base=orders;
2 list(auto) orderhead;
3 move (order-status) = "o";
4 set(match) list (order-status);
5 find(serial) orderhead,list=(@)
,perform=get-orderdata;
6 exit;
7 get-orderdata:
8 level;
9 set(key) list (cust-no);
10 list(auto) customer;
11 get customer,list=(@);
12 set(key) list (order-no);
13 list(auto) orderline;
14 format name:
order-no:
line-no:
part-number:
quantity;
15 output(chain) orderline,list=(@)
,nocount;
16 end(level);
17 return;