Getting Started with TRANSACT (32247-90007)

Chapter 9 171
Creating Custom Applications
User Exits
Figure 9-25. Providing User Exits
1 system custex,base=orders
2 ,vpls=formfile
3 ,file=formxref,exitxref;
4 define(item) menuname x(16):
5 fkey 9(2):
6 screen x(16):
7 lastkey i(4):
8 userexit-prog x(6):
9 userexit-marker @;
10 list menuname:
11 lastkey:
12 userexit-prog;
13
14 data menuname; <<to simulate transfer of control to this subroutine>>
15
16 <<
17 *************************************************************
18 Subroutine: to update customer information
19
20 input: menuname - contains the name of the screen to be displayed
21
22 output: none
23 *************************************************************
24 >>
25 list fkey:
26 screen;
27 list userexit-marker;
28 list(auto) custupd-global;
29 let (yes) = 1;
30 let (no) = 0;
31 let (error) = (no);
32 level;
33 list(auto) customer;
34 if (error) = (no)
35 then
36 get(form) (menuname),init
37 ,window=(" ")
38 ,fkey=lastkey
39 ,autoread
40 else
41 get(form) (menuname)
42 ,fkey=lastkey
43 ,autoread;
44 if (lastkey) = 8
45 then exit;
46 set(match) list (menuname);
47 get(serial) exitxref,list=(menuname,userexit-prog);