VGETNEXTFORM [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation
HP Data Entry and Forms Management System (VPLUS/V)
VGETNEXTFORM
Reads the next form from an open forms file into the form definition area
of memory.
Syntax
VGETNEXTFORM {comarea}
Parameters
comarea Must be comarea name specified when the forms file, from
which the form is to be retrieved, was opened with
VOPENFORMF. If not already set, the following comarea
items must be set before calling VGETNEXTFORM:
cstatus Set to zero.
comarealen Set to total number of two-byte words
in comarea.
cmode Set to zero.
nfname Set to name of next form, or $END,
$HEAD, $RETURN, or $REFRESH. See
"Communication Area" earlier in this
section for more information. (May
also be set by prior call to
VGETNEXTFORM, VOPENFORMF, VREADBATCH,
VINITFORM, VFIELDEDITS, or
VFINISHFORM.)
repeatapp Set to 1 if current form is to be
repeated, to 2 if repeated and
appended. Note that repeatapp must be
set to zero in order to retrieve and
display the next form. (Also may be
set by a prior call to VGETNEXTFORM,
VINITFORM, VFIELDEDITS, or
VFINISHFORM.)
freezapp Set to 1 if next form is to be appended
to current form, to 2 if current form
is to be frozen before next form is
appended. Set to zero in order to
clear the current form before
displaying the next form. (Also may be
set by prior call to VGETNEXTFORM,
VINITFORM, VFIELDEDITS, or
VFINISHFORM.)
VGETNEXTFORM sets the following items in comarea:
numerrs Set to zero.
cfname Set to name of form just read from
file.
cstatus Set to nonzero value if call
unsuccessful.
filerrnum Set to file error code if MPE file
error.
multiusage Set to 1 if current form is child or sibling of previous
form, zero otherwise.
In addition, if a new form has been retrieved (repeatapp
is zero), VGETNEXTFORM sets the following items:
cfnumlines Set to number of lines in form just
read (now the current form).
nfname Set to name of next form to be read
from file. See Discussion below for
more information.
repeatapp Set to value read from forms file for
this (current) form.
freezapp Set to value read from forms file for
this (current) form.
dbuflen Set to length (in bytes) of the current
form just read from the forms file.
Discussion
VGETNEXTFORM checks the value of repeatapp passed in comarea. If this
value indicates the current form is to be repeated, or repeated and
appended to itself, it does not read the next form, nor does it update
the values of cfnumlines, nfname, repeatapp, freezapp, or dbuflen. Note
that a repeating form is repeated until repeatapp is set to zero, either
by an application or, for ENTRY, when the user presses NEXT FORM to
request the next form, or by the FORMSPEC processing language. If the
current form is not to be repeated, VGETNEXTFORM checks nfname to
determine which form to read from the forms file.
Example
COBOL
CALL "VGETNEXTFORM" USING COMAREA.
BASIC
11 CALL VGETNEXTFORM(C(*))
FORTRAN
CALL VGETNEXTFORM(COMAREA)
SPL/PASCAL
VGETNEXTFORM(COMAREA);
The examples above call VGETNEXTFORM to retrieve the next form from the
forms file and reset the comarea according to the values in the next
form.
MPE/iX 5.0 Documentation