VPLUS Interface [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation
HP Transact Reference Manual
VPLUS Interface
Transact uses a subset of the data management verbs (GET, PUT, SET,
UPDATE) to access and control VPLUS forms. Without making calls directly
to VPLUS intrinsics, you can retrieve data from forms, move data to
forms, control the sequence of forms, manage function keys, and send
messages to the forms window. The VPLUS interface supports function key
labels on HP terminals and PCs using terminal emulators when such labels
are defined in FORMSPEC. It does not support the split screen feature of
HP 262X terminals, nor does it support data capture terminals.
Often, many different functions are performed with a single Transact
statement. For instance, GET(FORM) does the following:
* Gets and displays a form.
* Reads data entered by the user.
* Performs any edits specified through FORMSPEC.
* Highlights any field that contains errors and sends an error
message to the window.
* Transfers the data to the program.
* Checks the data against the data definitions in the program, and
again performs error processing, if necessary.
* Performs any finish phase operations specified by FORMSPEC.
Normally, Transact programs operate with the terminal in character mode.
Using any VPLUS interface verb places the terminal in block mode.
Transact automatically switches back to character mode for any operation,
such as a DISPLAY statement, that requires character mode.
VPLUS forms files and form layouts can be defined in the data dictionary
or in the SYSTEM statement of a Transact program. When definitions are
taken from the data dictionary, a reference to a forms file in the SYSTEM
statement causes Transact to retrieve all the forms defined in the forms
file for use at run time. You can also specify the form definitions
completely in the SYSTEM statement. This gives you the flexibility of
redefining field types and field order to suit your own purposes. Also,
you can specify within a forms file only the forms that are needed.
Local Form Storage
Transact supports VPLUS local form storage with all forms caching
terminals. Local form storage reduces datacomm overhead with frequently
used forms and causes the form to be displayed all at once instead of
being painted on the screen line by line. This is accomplished by
placing the form into the terminal memory. Only form images are
loaded--not associated data.
The HP 2626A and HP 2626W terminals can store as many as four forms
locally. The HP 2394A and HP 2624B terminals can store a maximum of 255
form names in their forms directory. However, the number of actual form
images they can store might be lower than this, depending on the size of
the forms and the size of the terminal memory. When the terminal is not
one of these types, the p-code generated for local form storage is
ignored.
The local form storage feature is enabled by the FSTORESIZE parameter of
the SYSTEM verb. This parameter specifies the maximum number of forms to
be loaded into the terminal memory. The SET(OPTION) FORMSTORE statement
causes the specified forms to be loaded into the terminal memory. The
number of forms successfully loaded is returned to the STATUS register.
Transact suppresses any error messages resulting from overloading the
terminal's local form storage memory at run time. Refer to the VPLUS
Reference Manual for more information.
NOTE Transact VPLUS forms caching is implemented to operate within a
single Transact system level. Forms caching should not be used
within both the main system and a subsystem or between different
levels in a Transact program.
Look-Ahead Loading
After local form storage is enabled, look-ahead loading is performed by
default. With this option, VPLUS loads the next form (as defined by the
forms file) before or after reading data from the current form, depending
on the type of datacomm being used. If the terminal memory is full,
VPLUS unloads the least recently used form (or forms) to make room. To
disable look-ahead loading, you use the SET(OPTION) NOLOOKAHEAD
statement. The RESET(OPTION) NOLOOKAHEAD statement can be used to enable
look-ahead loading, but it is needed only if the SET(OPTION) NOLOOKAHEAD
statement was previously used in the program.
You can still control which forms are loaded during look-ahead loading,
but the forms you specify can be unloaded to make room for the next form.
If you are unfamiliar with VPLUS local form storage, you should not
disable look-ahead loading, since Transact and VPLUS do most of the work
for you. If you include the FSTORESIZE parameter in the SYSTEM statement
but do not use the SET(OPTION) FORMSTORE statement, local form storage is
still performed using look-ahead loading, even though forms are not
explicitly loaded in the program.
If look-ahead loading is disabled, VPLUS does not unload forms from local
storage to make room for new ones. To unload forms, you must use the
RESET(OPTION) FORMSTORE statement. This statement is used only to make
room in local storage for new forms. For example, if you know that one
form is significantly larger than the others and is not used later in the
program, you can explicitly unload it to make room for new forms, rather
than relying on look-ahead loading to choose the best form to unload.
The RESET(OPTION) FORMSTORE statement is not required in any other
situation, since the local form storage memory is purged at the end of
the process.
Automatic Form Loading
Automatic form loading causes VPLUS to load each new form into local
storage before displaying it, if the form is not already in local
storage. When the local form storage memory is full, VPLUS unloads the
least recently used form. You can enable automatic form loading by using
the SET(OPTION) AUTOLOAD statement.
The two types of form loading differ in that automatic form loading loads
the current form, while look-ahead loading loads the next form (as
defined in FORMSPEC). When the form sequence in FORMSPEC is not the one
used in the application, look-ahead loading is usually inappropriate.
(For more information, see the discussions of the SYSTEM and SET verbs in
Chapter 8.)
Local Form Storage Example
The example shown below causes VPLUS to use automatic form loading with a
maximum of four forms. Local form storage is initialized to contain four
forms. Any new form not already in local form storage will be added
after the least recently used form is deleted.
SYSTEM ORDDL, BASE=ORDMGT, VPLS=ORDMGTFF, FSTORESIZE = 4;
DEFINE(ITEM) FORMSLOADED I(4);
|
|
SET(OPTION) FORMSTORE =
(ORDMGTMENU,ADDCUST,CHGCUST,DELCUST); << Load forms >>
IF (FORMSLOADED) < 4 THEN
DO
<< Report form loading error >>
DOEND;
|
|
SET(OPTION) NOLOOKAHEAD; << Look-ahead off >>
SET(OPTION) AUTOLOAD; << Auto load enabled >>
Special Notes
If you enable local form storage, VPLUS automatically configures the HP
2626A and HP 2626W terminals to use datacomm port 1 and removes the
HPWORD configuration from the HP 2626W. If local form storage is not
enabled (that is, if the FSTORESIZE parameter is omitted from the SYSTEM
statement), then VPLUS does not disturb the configurations of the
terminals. The local form storage memory is wiped out if the user
presses RESET or REFRESH at run time, if the DISPLAY verb is used between
forms, if the terminal goes out of block mode, or if appending forms are
used on the HP 2626A and HP 2626W terminals.
MPE/iX 5.0 Documentation