Getting Started with TRANSACT (32247-90007)

Chapter 6 99
Data Structures
Figure 6-6. VPLUS Explicit LIST=
or alternatively:
Figure 6-7. LIST= Item Range
to indicate a range of data items.
Lines 10 to 13 add a new record to dataset orderline using data items order-no, line-no,
part-number, quantity.
Figure 6-8. IMAGE Explicit Item List
Transact does not automatically figure out which items should be used for IMAGE. If we
omit the LIST= option, Transact assumes that all items currently known to the program
(via LIST) are to be used. In fact, this is also true of MPE and KSAM files.
However, the items have to be contiguous in temporary storage if LIST= is not included.
Since in our example they are not contiguous, we need to specify LIST=.
COBOL also has the facility to redefine storage. We have already seen one example above.
In the COBOL program example, by referencing the variable ws-vorderhead, a COBOL
program would perform a group level operation on order-no, cust-no, and order-status. The
COBOL program could also reference each of these data items individually.
9 get(form) vorderline,fkey=lastkey
9.01 ,list=(line-no,
9.02 part-number,
9.03 quantity);
9 get(form) vorderline,fkey=lastkey
9.01 ,list=(line-no:
9.02 quantity);
10 put orderline,list=(order-no,
11 line-no,
12 part-number,
13 quantity);