HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
648 AppendixL
A Programmer’s Guide to VPLUS
VPLUS Intrinsic Calls
VPLUS Intrinsic Calls
ENTRY.PUB.SYS is an example of an application which uses VPLUS intrinsic calls. This
program accepts data from a user and writes the information to an MPE file. The MPE file
contains information in the user label for use by ENTRY.PUB.SYS.
Since ENTRY.PUB.SYS does not meet the needs of some business environments, many
programmers develop customized programs to write the data to a database, an MPE file or
a KSAM file; or to perform edits on the data. An understanding of the purpose of each
intrinsic and the sequence in which the intrinsics are called is crucial to a successful
program. The intrinsics can be logically grouped into one of six functions. An application
program must use these functions in this sequence:
1. Opening Files
2. Preparing and Showing the Screen
3. Reading Data from the Screen
4. Editing
5. Returning Data to the Program
6. Closing Files
Illustration 1 in the appendix of this note is a flowchart of the VPLUS intrinsic calls. The
flowchart illustrates the sequence of calls that an application program may follow. It
groups the intrinsics into one of the six functions listed above. Note that it does not include
examples of local form storage, softkey labeling, or interfacing with VPLUS batch file
Opening Files
Before a VPLUS application can run, it must open the necessary files. VOPENFORMF is
called to open a formsfile. VOPENTERM is called to open a terminal. Note that VPLUS
requires an HP block mode terminal. For a list of the supported terminals, refer to
Appendix G of the VPLUS/V Reference Manual.
VOPENFORMF
Purpose: to open the formsfile to be used by the application.
VOPENFORMF should be the first VPLUS intrinsic call executed in an application program.
This intrinsic opens the formsfile specified in the call. Parameters passed to VOPENFORMF
are the comarea array and the formsfile name. The comarea array is a 60 word
communication area between the program and VPLUS. The comarea array contains
assorted fields to be set before an intrinsic call.
One important field is CSTATUS or the status word. This is set on the completion of each
VPLUS intrinsic call. The programmer should check this status after each intrinsic call to
determine the success or failure of the call. If the status word is not zero, subsequent
VPLUS intrinsic calls are not executed. If the program uses local forms storage or labeled
softkeys, the FORM’STORE’SIZE and LABEL’OPTION words of the user’s COMAREA must be
set prior to calling VOPENFORMF. VOPENFORMF allocates additional space on the user’s stack