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

4- 32
Comments
1 This line defines the input record for processing event code 09
(VPLUS edit errors).
2 This line defines the field, NUMBER, which contains a count of
the VPLUS edit errors.
3 This line displays the VPLUS form on the terminal. The SHOW
action is executed after the EDITS action (see line 8). It
redisplays the form so that a user can correct edit errors.
4 This line enters the VPLUS action, RDTERM, into the output
field, ACTION. RDTERM retrieves data from the terminal and saves
it in the VPLUS buffer.
5 This line performs exception output for the record associated
with EXCPT Group V$ACTN.
6 This line returns the event code for the RDTERM action.
Columns 28-32 contain READ to perform a read to the TERMINAL
file.
7 This line directs program execution to RDSCR7 when a user
presses a function key instead of entering data. (when F0 is
turned on, the user entered data and pressed ENTER .)
8 This line enters the VPLUS action, EDITS, into the output field,
ACTION. EDITS performs the field edits specified by FORMSPEC.
Columns 33-42 contain EDITS to specify the VPLUS action.
9 This line performs exception output for the record associated
with EXCPT Group V$ACTN.
10 This line returns the event code for the EDITS action.
11 When event 09 occurs (an edit error), this line directs program
execution to RDSCR1. RDSCR1 redisplays the form so that a user
can enter corrections.
12 This line enters the VPLUS action, GETDTA, into the output
field, ACTION. GETDTA moves data fields from the VPLUS buffer to
the program.
13 This line performs exception output for the record associated
with EXCPT Group V$ACTN.
14 This READ operation moves fields in the VPLUS buffer to the
corresponding fields in the terminal input record.
15 This line defines the output record associated with EXCPT Group
V$ACTN.
16 This line defines the field, ACTION, which contains the VPLUS
action code.
Processing VPLUS Form Data. Once you retrieve screen data from the VPLUS
buffer with a GETDTA action followed by a READ operation, the data is
moved to the appropriate input record in the program. You process the
data fields in the input record as you would normally.
Moving Data to a VPLUS Form and Displaying It. This section explains how
to display data that is calculated in the program or that comes from
sources such as a disc file. For example, you may want to display master
file information in response to a query.