Getting Started with TRANSACT (32247-90007)
154 Chapter9
Creating Custom Applications
Figure 9-3. Basic Program to Maintain Customers (VPLUS)
The program uses the same form to initially input the customer to be updated (line 5),
display the current data for the customer (line 9), and input the new data for the customer
(line 10).
1 system custfm,base=orders,vpls=formfile;
2 list(auto) customer;
3
4 level;
5 get(form) vcustomer,init;
6
7 set(key) list (cust-no);
8 get customer,list=(@);
9 put(form) vcustomer,window=("update? - f1=yes, f2=no");
10 get(form) vcustomer,f1(autoread)=modify-f1
11 ,f2=modify-f2;
12
13 modify-f1:
14
15 update customer,list=(@);
16
17 modify-f2:
18
19 end;
20
21
22 exit:
23
24 exit;