HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 365
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VWRITEBATCH
Writes a record to the batch file from the data buffer in memory, or deletes a record from
the batch file
Syntax
VWRITEBATCH {
comarea
}
Parameters
comarea
Must be
comarea
name specified when the batch file was opened with
VOPENBATCH. If not already set, the following
comarea
items must be set
before calling VWRITEBATCH:
cstatus
Set to zero.
comarealen
Set to total number of two-byte words in
comarea
.
recnum
Set to record number in batch file to which data is to be
written (record numbers start with zero). The
recnum
is
initialized to zero by VOPENBATCH (or to the next sequential
record number if the file is an existing file).
deleteflag
Set to TRUE (all ones) if record is to be deleted.
(The
cfname
and
dbuflen
should be set by a prior call to VGETNEXTFORM.)
VWRITEBATCH may set the following
comarea
values:
cstatus
Set to nonzero value if call unsuccessful.
filerrnum
Set to file error code if MPE file error.
numrecs
Incremented each time a new record is written;
decremented if record is deleted.
Discussion VWRITEBATCH writes the contents of the data buffer to the record specified by
recnum
in an open batch file. (The
recnum
must be maintained by the calling program.)
VWRITEBATCH writes the following information to the batch record:
• Contents of the data buffer
• Batch record control information (from
comarea
):
deleteflag
TRUE if record is deleted.
cfname
Name of the form associated with this data.
dbuflen
Length (in characters) of the data buffer.
(Refer to "Record Format" in the VOPENBATCH description for a diagram of the batch
record.)
VWRITEBATCH may be used in both the data collection and modify modes.
Data Collection Mode The data in the data buffer is entered on a particular form
displayed at a terminal and then read into the data buffer by VREADFIELDS.
VWRITEBATCH can then be called to write the data buffer and the record control information