HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 275
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VGETBUFFER
Copies entire contents of data buffer from memory to an application.
Syntax
VGETBUFFER {
comarea,buffer,buflen
}
Parameters
comarea
Must be
comarea
name specified when the forms file was opened with
VOPENFORMF. If not already set, the following
comarea
items must be set
before calling VGETBUFFER:
cstatus
Set to zero.
language
Set to the code identifying the programming language of
the calling program.
comarealen
Set to total number of two-byte words in
comarea
. Must be
at least 70 words in length if the ARB feature is used.
buffercontrol
Set bit 15 to 1 to indicate that data is to be transformed
according to the ARB specifications.
VGETBUFFER may set the following
comarea
items:
cstatus
Set to nonzero value if call unsuccessful.
bufferstatus
Bit 15 set to 1 if data conversion successful.
buffer
Character string in an application to which the data in the data buffer is
copied. Could also be a record describing the ARB, i.e., non-CHAR data.
buflen
Two-byte integer variable that specifies the number of bytes to be
transferred to the user buffer.
Discussion
This intrinsic transfers data from the data buffer in memory to the area in an application
specified by the
buffer
parameter. The data includes everything in the unprotected and
display-only fields on a form. Previously, data in the data buffer was stored in the order of
the fields on the form, and specific fields could be moved from the buffer with VGETFIELD or
VGETtype. Now, the Application-ready Buffer (ARB) allows you to specify, using the
FORMSPEC ARB feature, the order in which the application should receive the fields in
the buffer, and the data type conversion to be performed on each (see the discussion on
creating an ARB in Section 3). You need no longer use VGETtype to convert individual
fields; a call to VGETBUFFER accomplishes the task.
The number of bytes moved from the data buffer is based on the number of bytes specified
in the
buflen
parameter, or the number of bytes specified by the
dbuflen
item in the
comarea
(refer to Table 6-5), whichever is less. The
dbuflen
item is set by VGETNEXTFORM
when the current form is read into memory. For example, if there are 20 bytes in the data
buffer (
dbuflen
is 20), and the user requests 50 bytes in the
buflen
parameter, only 20
bytes are transferred. Conversely, if the user requests 10 bytes through the
buflen
parameter, but there are 20 bytes in the data buffer (
dbuflen
is 20), only 10 bytes are
transferred.