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

650 AppendixL
A Programmer’s Guide to VPLUS
VPLUS Intrinsic Calls
2. Issue a file equation as follows:
:FILE {termfilename};DEV=xx
{termfilename} is the name used in your call to VOPENTERM; ‘xx’ is the LDEV of the
terminal to which you are redirecting the screens
Another method that can be used in your application is to redirect the display of the error
message from the program to another device. This allows the screen to be displayed on the
terminal from which you are running the program, but the error messages will be directed
elsewhere. This method of redirecting $STDLIST is the easiest to use.
1. Issue a file equation to the device where you would like the displays directed, for
example:
:FILE TEST;DEV=LP
or
:BUILD TEST;REC=-132,1,F,ASCII;DEV=DISC :FILE TEST,OLD;DEV=DISC
or
:FILE TEST;DEV={LDEV # of terminal, which must be AVAIL
2. After setting the file equation in step 1, run the program as follows:
:RUN {vprog};STDLIST=*TEST
Preparing and Showing the Screen
The next stage in a VPLUS application program is to prepare and show the screen.
Preparing the screen to be displayed involves retrieving the form definition and
initializing fields with the desired values. Optionally, it may include initializing the
terminal window with a message and labeling the function keys. The intrinsics which
prepare the screen to be shown are VGETNEXTFORM which retrieves the specified next form’s
design; VINITFORM and/or VPUTBUFFER which places values into fields on the screen;
VPUTWINDOW which places a message to be shown on the terminal window; and
VSETKEYLABEL(S) which can label function keys. After all the information to be displayed is
set up, VSHOWFORM is called to display the form.
This section discusses the VGETNEXTFORM, VINITFORM, VPUTBUFFER and VSHOWFORM
intrinsics. When used in a program, the intrinsics are called in the order listed.
VGETNEXTFORM
Purpose: to retrieve the next form’s definition.
VGETNEXTFORM is the next intrinsic called after VOPENTERM. It is the first intrinsic to
prepare and show the screen. It may also be called when a new form is to be displayed on
the terminal.
The only parameter passed to VGETNEXTFORM is COMAREA. Within the comarea array, there
are several variables pertinent to VGETNEXTFORM such as NFNAME, REPEATAPP, FREEXAPP
and CFNAME. NFNAME is the variable containing the next form’s name. CFNAME is the
variable containing the current form’s name. After the call to VGETNEXTFORM, the CFNAME
variable in the comarea array is updated to contain the name of the form just read from