HP RPG/XL Programmer's Guide (30318-90001)

4-: 37
Figure 4-22. Using Function Keys with VPLUS
Comments
1 This line defines the terminal file, TERMINAL.
Column 50 contains L to enable the function key labels.
2 This line defines the function key label array, LBL. There are 8
labels in array, each label containing 16 characters.
3 This line enables all function keys.
4 This line uses the setting of F1 to direct program execution.
The subroutine, ADD, is executed when F1 is turned on.
5 This line uses the setting of function key F0 to direct program
execution. Program execution goes to RDSCR1 when F0 is turned
on. F0 is turned on when a user enters data into the VPLUS form
and then presses ENTER .
A Sample Program Using VPLUS. This section lists a complete program that
processes screen data using VPLUS forms.
The program in Figure 4-23 updates the D-ACCOUNTS data set. This data
set keeps customer information such as account number, name and address.
The data set is part of the TurboIMAGE MARKET database whose schema is
shown in Figure 3-23. Users access customer records by the customer's
account number and select the type of update operation by pressing one of
the function keys, F1 , F2 , F3 or F5 (add, change, query, delete).
The program uses VPLUS to handle all screen input and output.