HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
230 Chapter6
USING VPLUS INTRINSICS
HOW INTRINSICS ARE USED
HOW INTRINSICS ARE USED
The VPLUS intrinsics control the interface between forms stored in a forms file, a terminal
screen, data entered on a form, and an application. Table 6-1. illustrates the relation
between the VPLUS intrinsics, terminal, forms file, application, data file or optional batch
file, and the buffer areas in memory used by the intrinsics.
The intrinsics use a buffer area in memory for the form definition and another buffer area
for the data. A third area in memory is used as a buffer for the window area, the line on the
form to which error and other messages are sent. User-defined function key labels also
reside in a buffer area while they are active. There is a buffer area for global labels and
another for form-specific labels. These buffer areas are managed by VPLUS and are in
addition to any buffers the application may define.
Form Definition Area
A form displayed on the terminal screen consists of protected areas (headings, labels,
titles, display-only fields) and the unprotected areas (fields) into which data can be entered
by a user.
Any form written to the terminal screen by VSHOWFORM already resides as a form image in
memory. It may also be stored in terminal local form storage. The form image contains the
description of all the protected areas on the form, except for "display only" fields. It also
contains the visual enhancements for all fields, protected and unprotected. The form image
can be loaded from the forms file into local form storage by VLOADFORMS. Or the form image
is read from the forms file into memory by a call to VGETNEXTFORM. Then it is written to the
terminal screen or loaded into local form storage depending on options that can be set in
VREADFIELDS or VSHOWFORM.
Associated with each form is a set of data specifications — field attributes and processing
specifications defined in FORMSPEC. These specifications are read from the forms file by
VGETNEXTFORM and reside in memory during execution of the form. The field attributes can
be dynamically altered using VCHANGEFIELD.
Data Buffer Area
Besides the form definition, there is a data buffer area in memory that contains data for all
the fields (unprotected and display only) defined for the form. These fields reside in the
buffer in the order they are defined on the screen, from left to right, top to bottom.
When
ENTER is pressed at the terminal, VREADFIELDS transfers the user-entered data
from the screen to the data buffer. Before data is entered, if there are any initializations,
VINITFORM sets the appropriate fields in the buffer to initial values. In the field phase,
VFIELDEDITS verifies and possibly modifies the user-entered data in the data buffer
according to any edit specifications defined for the fields. VFINISHFORM performs any final
form modifications specified in the "finish" phase. Data for display-only fields may be
written to the buffer by VINITFORM, VFIELDEDITS, or VFINISHFORM. Any changes to the
data buffer are displayed at the terminal by the next VSHOWFORM.
An application can send data to the buffer with VPUTBUFFER or to a single field in the