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

4- 30
8 This line enters the VPLUS action, SHOMSG, into the ACTION
output field. SHOMSG displays a message in the VPLUS message
window.
9 This line performs exception output for the record associated
with EXCPT Group V$MESG.
10 This line enters the VPLUS action, SHOW, into the ACTION output
field. SHOW displays the form in the VPLUS buffer.
11 This line performs exception output for the record associated
with EXCPT Group V$ACTN.
Reading a VPLUS Form. Once you display an initialized VPLUS form (see
the previous section), a user can start entering data into it from the
terminal. This section explains how to read that data into an RPG
program.
Reading screen data involves three steps. The first step is to read
screen data into the VPLUS buffer. The second step is to direct VPLUS to
edit the data according to the edit values entered with FORMSPEC. The
last step is to move the screen data from the VPLUS buffer to fields in
the program.
Figure 4-17 shows how to perform these steps. (Refer to Figure 4-15 for
a description of the terminal input record associated with EXCPT Group
V$DATA.) You read screen data into the VPLUS buffer by using the VPLUS
action, RDTERM, followed by a READ operation (READ returns the event code
for the action). To perform the second step, editing the data, enter the
VPLUS action, EDITS, and a READ operation (READ returns the event code
for the action). VPLUS does the editing specified in FORMSPEC. If you do
not want VPLUS to perform the edits or you want to edit the data
yourself, you may omit this step. When VPLUS finishes the edits and
returns to the program, it gives you a count of the number of errors. If
there are errors, you redisplay the VPLUS form so that the user can
correct mistakes (in this figure, the SHOW action in line 3 is executed).
To perform the last step, moving data from the VPLUS buffer to the
program's input record, enter the VPLUS action, GETDTA, followed by a
READ operation (READ returns the event code for the action).