HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

Chapter 6 311
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
originated from the same forms file.
VMERGE users should be aware that VMERGE makes the $HEAD form from VMASTER the $HEAD
for VOUTPUT. If data entry operators are used to seeing the $HEAD form from the VAUX file,
they may be surprised if this $HEAD form is no longer what is displayed when they bring up
their application.
Technical Reference
VMERGE normally resides in PUB.SYS; if it is moved from PUB.SYS, it must be moved to a
group with “DS” capability.
VMERGE is invoked with the following command:
:RUN VMERGE.PUB.SYS
Before invoking VMERGE, three file equations must be given. The two VMERGE input forms
files are indicated by the file designators VMASTER and VAUX. VMASTER and VAUX must
designate existing forms file, with file codes VFORM or VFAST. The VMASTER and VAUX files
must have been compiled with a recent version of FORMSPEC. If an input file is provided
that does not meet this criterion, a message is given, and VMERGE processing halts.
VMERGEs output VFAST forms files is indicated by the file designator VOUTPUT. If the
designated file already exists and has the file code VFAST, then it is purged and recreated
by VMERGE. If the file exists but has a file code other than VFAST, the file is not purged, a
warning message is given, and VMERGE halts.
The files used by VMERGE are opened for exclusive use to avoid concurrent update problems.
Two JCWs (job control words) are defined for use with VMERGE: VMERGETERSE and
VMERGEERROR. If the user sets VMERGETERSE to 1 before running VMERGE, then the messages
indicating the form names contained in the VMASTER and VAUX files are suppressed. The
VMERGEERROR JCW is set by VMERGE after it runs. If VMERGE detected a severe error that
prevented the VOUTPUT file from being successfully created, VMERGEERROR is set to 1. If
VMERGE successfully created the VOUTPUT file, VMERGEERROR is set to 0.
Example 1: Using VMERGE to Combine Forms Files Suppose your company has
three distinct uses for an order form prepared by a salesperson. The order form is used in
the shipping department, the billing department, and the marketing department.
Currently the original order form is passed among three clerks who each enter their data
using their own VPlus forms files (SHIPFF, BILLFF, and MARKETFF) that are distinct to
their respective departments. Your job is to merge the forms files and fix the application
program so that one clerk can enter the data for all three departments.
You decide that each of the three application areas (shipping, billing, and marketing)
should be selectable by pressing a function key. Once an area has been selected, processing
will be performed using the same sequence as when the application for that area existed
on its own. Remember that while combining the three applications into one, you will need
to examine the effect of $HEAD being different from what two of the original three programs
expected. Most likely, you will want to create a new form to serve as the $HEAD for the
combined application.
After examining and fixing the application program, you will need to look at the forms files
and make them compatible, if they are not already. You will need to make sure that the
save fields, if any, have distinct names and are identical in each of the forms files that uses