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

4-: 23
When you're finished designing the VPLUS form, enter the following
specifications in the RPG program to define the form.
File Description Specifications -
Enter the specifications for a terminal file. This is the forms file
you created with FORMSPEC. Specify that it is a WORKSTN file.
Input Specifications -
Enter input records describing the fields in the VPLUS form. Also
enter one or more records for processing VPLUS
event
codes. (You use
event codes to identify the type of input the user entered.)
Output Specifications -
Define an output record describing the VPLUS form and one describing
the message window (the message window is used for displaying
one-line messages at the bottom of the screen). You may also need to
define a separate output record for processing VPLUS
action
codes.
(You use action codes to specify the VPLUS operation to perform.)
* Perform a VPLUS action or return a VPLUS event
Calculation Specifications -
For each VPLUS operation you want to perform, enter Calculation
Specifications to identify and execute it as follows:
1. Enter a MOVE operation to move the VPLUS action code (for the
operation you want to perform) to the first field of the
terminal file's output record.
VPLUS has several action codes that you can use. Here are the
ones that are discussed in this chapter:
Action code: Description:
CHGNXT Changes VPLUS forms.
EDITS Performs the data edits specified in
FORMSPEC. VPLUS returns an edit error
count to the program.
GETDTA Moves data from the VPLUS buffer to the
program's input record.
GETNXT Gets the next form from the VPLUS forms
file.
INIT Initializes form fields according to the
edits specified in FORMSPEC.
PUTDTA Moves data from the terminal output record
to the VPLUS buffer.
RDTERM Reads screen data into the VPLUS buffer.
SHOMSG Displays a message in the message window.
For example, the operation MOVEL "GETDTA" ACTION moves the
GETDTA action code to the output field, ACTION.
2. Once you move the VPLUS action code to the output record,
perform exception output (EXCPT operation) for that record.
VPLUS performs the action and returns control to your program.
3. To complete input actions (for example, GETDTA), enter a READ