HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Appendix L 649
A Programmer’s Guide to VPLUS
VPLUS Intrinsic Calls
based on the values of these fields. Other words in the comarea array that need to be set
prior to VOPENFORMF’s call are:
• LANGUAGE which contains the language code of the calling program
• COMAREALEN which contains the length in words of the comarea array.
In addition, for BASIC/3000 programs, USRBUFLEN should specify the number of words
needed for the comarea extension on the stack.
When VOPENFORMF is executed, it opens the formsfile and allocates space on the stack for
the comarea extension. The comarea extension is used by VPLUS to protect data between
calls, to provide a buffering mechanism so that terminal reads are transparent to the user,
and to aid in directory searches for formsfile information. Illustration 2 in the appendix of
this note contains a layout of the tables which are in the comarea extension. For most
programming languages, the comarea extension resides in the DL-DB area of the stack.
For BASIC/3000, the comarea extension is declared as a variable of the program and
resides with the global variables.
VOPENTERM
Purpose: to open the terminal as a file and set the terminal for block mode.
Another intrinsic which performs an open function within VPLUS is VOPENTERM. This
intrinsic is called after VOPENFORMF. VOPENTERM does exactly what its name suggests. It
opens the terminal as a file. In addition it sets the terminal in block mode and initializes
the user function keys to contain the escape sequences which VPLUS expects.
Two parameters are passed to VOPENTERM: COMAREA and TERMFILE. COMAREA is the comarea
array which VPLUS uses to communicate with the program. The words within the
comarea array that VOPENTERM requires before the call are: CSTATUS, LANGUAGE,
COMAREALEN and FORM’STORE’SIZE. These words were set at the time VOPENFORMF was
called and therefore do not need to be reinitialized. Upon the completion of the call,
VOPENTERM returns additional information (such as CSTATUS) in the comarea array which
indicates the success or failure of a call. It also returns FILERRNUM which is the file system
error if it could not open the terminal; FILEN which is the MPE file number of the terminal
file; IDENTIFIER which contains a unique terminal ID assigned to a specific terminal; and
ENVIRON which contains the logical device number of the terminal.
TERMFILE specifies a file name which is opened. This file defaults to the logical device from
which the program is being run.
When debugging your VPLUS application, the messages displayed from your programs are
only displayed within the unprotected fields on a form. For debugging purposes, it is
possible to redirect the screen to another logical device so that an error message sent to
$STDLIST is displayed in its entirety.
To redirect the VPLUS screen to another LDEV, you should:
1. Ensure that the other terminal’s LDEV number is AVAIL by issuing a :SHOWDEV
command. The terminal must be logged off. Do not use the keyboard or the terminal
becomes unavailable at that time. The terminal must be configured at the same baud
rate as the port of garbage will print when VPLUS displays the screen. This is because
no speed sensing is done when the screen is routed to the alternate terminal.