Getting Started with TRANSACT (32247-90007)

66 Chapter3
Using VPLUS and IMAGE
Updating Data in a Dataset
Figure 3-11. VPLUS Form for Customer Number
To implement this, we need only change the name of the form in line 5 of Figure 3-9 above
and we now have a program working with two forms.
Figure 3-12. Program accessing two VPLUS forms
5 GET(FORM) displays the new form and accepts the cust-no from the user.
11 PUT(FORM) replaces the form vcustno with the form vcustomer, displays
the current customer data, and allows the user to change it.
vcustno update customer data
enter customer number to update [ ]
1 system ex27,base=orders,vpls=formfile;
2 list(auto) customer;
3 repeat
4do
5 get(form) vcustno,init;
6 if (cust-no) <> 0
7 then
8do
9 set(key) list (cust-no);
10 get customer;
11 put(form) vcustomer;
12 get(form) vcustomer;
13 update customer;
14 doend;
15 doend
16 until (cust-no) = 0;