HP 3000 Manuals

HOW INTRINSICS ARE USED [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

HOW INTRINSICS ARE USED 

The VPLUS/V intrinsics control the interface between forms stored in a
forms file, a terminal screen, data entered on a form, and an
application.  Figure 6-1 illustrates the relation between the VPLUS/V
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/V 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 buffer with VPUTFIELD or VPUTtype.  Conversely, the data
buffer can be copied to an application with VGETBUFFER, or a single field
can be copied with VGETFIELD or VGETtype.

[]
Figure 6-1. Operation of VPLUS/V Intrinsics As is done in ENTRY, during data collection, data in the data buffer can be written to the batch file by VWRITEBATCH. The data in the batch file can be read from the batch file to the data buffer by VREADBATCH. Typically, data is read from the batch file for display at the terminal during browse and modify operations. Window Area If the field editing specifications detect an error in data entry or data movement, an error flag is set for the field. When called, VERRMSG returns the message associated with the error, and VPUTWINDOW puts the message into the window. If an error is detected by an application, VSETERROR may be used to set the error flag, and also to put any message associated with the error into the window. Any nonerror messages generated by an application are put in the window by VPUTWINDOW. A subsequent call to VSHOWFORM displays the contents of the window at the terminal. Key Label Area If there are user-defined function key labels, these labels are transferred to the key label area of memory. There is a key label area for global function key labels and another area for current form labels (global labels are associated with a forms file; form labels are associated only with the current form). Labels may be defined with FORMSPEC. Alternately, VSETKEYLABEL or VSETKEYLABELS may be used to override existing labels with labels from the application. Global labels defined with FORMSPEC are transferred to the global key label area when the forms file is opened by VOPENFORMF. Form labels defined by FORMSPEC are transferred to the form key label area by VGETNEXTFORM. A global or current form label specified by VSETKEYLABEL is copied into the appropriate key label area from an application. VSETKEYLABELS functions in the same manner for multiple label definitions. Labels are displayed on HP terminals by a call to VSHOWFORM.


MPE/iX 5.0 Documentation