Getting Started with TRANSACT (32247-90007)
74 Chapter3
Using VPLUS and IMAGE
Setting Up a Menu-Driven System
4 The GET statement drives the program. The mainmenu is displayed and,
depending on the function key entered, various routines are executed.
When any of the three tasks finishes, END returns control to the first line
in the present level, which is line 4.
The options F1=, F2=, and F3= specify a conditional transfer of control
depending on the function key pressed. This is like a GOTO rather than a
PERFORM. However, by proper use of the LEVEL and END, the logic flow
can be made to resemble a PERFORM more closely.
5 END returns control to the start of the current level which means we
return to statement 4.
6 The code to add a customer executes when the user presses [[ F1 ]].
9 END returns control to the start of the current level which means we
return to statement 4.
10 The code to update a customer executed when the user presses [[ F2 ]].
17 END returns control to the start of the current level which means we
return to statement 4.
18 The code to report a customer executes when the user presses [[ F3 ]].
26 END returns control to the start of the current level which means we
return to statement 4.
By default, if [[ F8 ]] is pressed, we terminate the program.