VREADFIELDS [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation
HP Data Entry and Forms Management System (VPLUS/V)
VREADFIELDS
Accepts all user input from an open terminal, including data entered by
pressing ENTER, or user requests made by pressing a function key. Allows
look-ahead form loading.
Syntax
VREADFIELDS {comarea}
Parameters
comarea Must be comarea named specified when terminal file was
opened with VOPENTERM. If not already set, the following
comarea items must be set before calling VREADFIELDS:
cstatus Set to zero.
comarealen Set to total number of two-byte words
in comarea.
The following comarea items can be set:
lookahead Set to zero to enable look-ahead form
loading or to one to disable look-ahead
form loading.
showcontrol Set to control the touch feature or to
affect the display on data capture
devices. The particular settings are
described below.
VREADFIELDS may set the following comarea values:
numerrs Set to zero.
lastkey Set to code for terminal function key
pressed by user .
cstatus Set to nonzero value if call
unsuccessful.
Discussion
VREADFIELDS accepts user-entered data when ENTER is pressed. It maps the
data into the data buffer in memory. The data is mapped in screen order,
from left to right, top to bottom. If there are any display-only fields
already in the buffer, the fields read by VREADFIELDS are interspersed
among the display-only fields according to the screen order. VREADFIELDS
then sets lastkey to zero. Note that the keyboard is locked after the
data is read (the subsequent call to VSHOWFORM unlocks the keyboard). If
a function key is pressed, VREADFIELDS sets lastkey to the corresponding
number: 1 for f1, 2 for f2, and so forth. The screen is not read and
data is not transferred when a function key is pressed. It is, however,
possible to accomplish this by enabling the AUTOREAD feature. To enable
AUTOREAD, a bit must be set in the termoptions position of the comarea.
For further information regarding the AUTOREAD feature, consult the
Terminal Communications Area section of Appendix G.
Application programs must supply the code to perform each of the
functions that can be requested via a function key. The particular
function assigned to a key is determined only by how the program
processes the key code passed to it by VREADFIELDS (refer to Appendix A
for examples of applications using VREADFIELDS).
Normally, there is no time limit for VREADFIELDS, whether the intrinsic
is to be terminated by the enter key or by a function key. Timeouts can
be enabled in an application by setting bits in the termoptions word of
the comarea and specifying a timeout interval in the usertime word of the
comarea. For more information regarding user timeouts, consult the
Terminal Communications Area section of Appendix G.
For any terminal with touch capability, an application activates the
touch feature by setting bit 0 of showcontrol to one. Then, for each
time the user touches a field, VREADFIELDS returns lastkey with the field
number of the touched field (as a negative number). Refer to Appendix G
for the "Supported Terminal Features" list.
For the data capture devices, VREADFIELDS, not VSHOWFORM, displays a form
one field at a time and reads entered data, also one field at a time.
Editing is performed after data for all the fields in the form has been
read. VREADFIELDS sets lastkey as follows for these terminals: -1 is
the ATTENTION key, 0 is the ENTER key, 1 is the "A" key, 2 is the "B"
key...and 26 is the key. If a function key is pressed when entering data
on the data capture devices, VREADFIELDS returns to the calling program
and does not display any remaining fields.
Bits 12 and 11 of the comarea item showcontrol affect form display on the
data capture devices. These bits can be set as follows:
bit 12 = 0 Stop after displaying a form without fields.
1 Do not stop after displaying a form without fields.
11 = 0 Do not put a right closing bracket (]) on all input
fields.
1 Put a right closing bracket (]) on all input fields.
A form without fields can be used to display a message
to a user. If bit 12 is zero, this type of form is
frozen until ENTER or a function key is pressed so that
the user has time to read the message. If bit 11 is
one, a right bracket is displayed as a terminator on all
input fields.
VREADFIELDS may also invoke look-ahead form loading for terminals with
local form storage using the comarea item lookahead. If point-to-point
data communications is being used, the next form (as defined in the forms
file) is loaded into the terminal's local form storage memory while the
user is typing in data) before ENTER is pressed. If multipoint or X.25
data communications is being used, the next form is loaded after the data
has been read, after ENTER is pressed. If there is no room in local form
storage for the next form, or if there are no available entries in the
form storage directory (set with formstoresize prior to VOPENTERM and
VOPENFORMF), the least recently used form could be purged from local form
storage. Look-ahead form loading does not load multiple family members.
If a family member of the next form is already in local form storage,
this family member is changed into the required form when it is
displayed. (Refer to Section 4 for more information on Local Form
Storage.)
If the next form does not load successfully, no error is returned. The
next form is simply displayed by VSHOWFORM.
Example
COBOL
CALL "VREADFIELDS" USING COMAREA.
BASIC
130 CALL VREADFIELDS(C(*))
FORTRAN
CALL VREADFIELDS(COMAREA)
SPL/PASCAL
VREADFIELDS(COMAREA);
Each of the following calls accepts user input from the terminal,
transfers any data to the data buffer, and sets lastkey.
MPE/iX 5.0 Documentation