Getting Started with TRANSACT (32247-90007)

70 Chapter3
Using VPLUS and IMAGE
Reporting Data from a Dataset
5 PUT(FORM) displays the report heading form to the terminal. The
FREEZE option freezes the form on the terminal so that the scrolling
portion of the screen begins below this form.
6 The LIST= option designates the items in the program list that the FIND
verb is to retrieve. If we didn't do this, it would attempt to retrieve the
item counter from dataset customer and would be unable to do so. The
default for IMAGE data access verbs is to retrieve all items known to the
program via the LIST verb unless this is overridden on the data access
verb with the LIST= option. We will see more of this in the section on data
structures.
The colon between cust-no and zipcode specifies a range of data items. In
this example, we are telling Transact to limit itself to the range of items
starting with cust-no and ending with zipcode.
7 Here we have ended the display of all full screens of customer data.
Counter will be greater than zero if we have displayed another customer
since the last time the screen was entirely filled. If so, then we must pause
one more time to give the user the opportunity to review this data before
going on. Lines 7 and 8 take care of the last set of records if there are
fewer than five.
8 We only want to update the VPLUS message window and wait for a
response. We save data transmission time by not re-sending the form data
to the screen, thus the LIST=() option which specifies a null item list.
12 If this customer fills the screen, then wait for the user to indicate that he is
ready to continue, otherwise append this new customer to the screen and
go on.
This program produces the screen output shown below.