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

Chapter 6 333
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VPUTFIELD
Copies data from an application into a specified field in the data buffer in memory.
Syntax
VPUTFIELD {
comarea,fieldnum,fieldbuf,buflen,actualen,nextfldnum
}
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 VPUTFIELD:
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
.
VPUTFIELD may set the following
comarea
items:
cstatus
Set to nonzero value if call unsuccessful.
numerrs
May be decremented if new value is moved to a field which
has error flag set.
fieldnum
Two-byte integer variable containing the number assigned to the field in
the data buffer by FORMSPEC.
fieldbuf
Character string in an application containing the data to be copied to the
specified data buffer field.
buflen
Two-byte integer containing the number of bytes to be copied from
fieldbuf
to the field identified by
fieldnum
.
actualen
Two-byte integer that specifies the number of bytes actually copied.
nextfldnum
Two-byte integer to which VPUTFIELD returns the number of the next field
in screen order. If there are no more fields, it returns zero.
Discussion
The data in an application is copied to the field in the data buffer identified by its field
number. Note that the field number is a unique number assigned to the field by
FORMSPEC when the form is first created. The number assigned to a field by FORMSPEC
does not change regardless of any changes to the field's position in the form or to its length.
The field number can only be changed with the batch command, RENUMBER, as described in
Section 7. The field number must not be confused with the screen order number, which is
the field's position in the data buffer and corresponds to its position in the form.
If the field is shorter than the data transferred to it, the data is truncated on the right. If
the field is longer than the data transferred to it, the data, if any, in the remaining space in
the field is not changed.
If the field whose data is being replaced contained an error, VPUTFIELD clears the field's
error flag, and decrements
numerrs
.