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

336 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VPUTtype
Copies a numeric value of specified type from an application to a field in the data buffer in
memory, converting the value to character set coded external representation.
Syntax
VPUT
type
{
comarea,fieldnum,variable
}
Parameters
type
The
type
in VPUTtype indicates that this intrinsic may be specified as:
VPUTINT converts value to two-byte integer
VPUTDINT converts value to four-byte integer
VPUTREAL converts value to four-byte real value
VPUTLONG converts value to eight-byte long value
*VPUTPACKED converts packed decimal format to character set coded
ASCII; this intrinsic has two extra parameters,
numdigits
and
decplaces
. Both are two-byte integer variables that
contain the number of digits and number of decimal
places, respectively, specified by the COBOL
usage is
comp-3
data declaration.
*VPUTZONED converts zoned decimal format to character set coded
ASCII; has the parameters
numdigits
and
decplaces
,
which are two-byte integer variables that contain the
number of digits and number of decimal places,
respectively, specified by the COBOL data declaration.
VPUTYYMMDD converts six-byte character value to YMD, DMY or MYD
For example:
CALL "VPUTINT" USING COMAREA,FIELDNUM,VARIABLE
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 VPUTtype:
cstatus
Set to zero.
comarealen
Set to total number of two-byte words in
comarea
.
VPUTtype may set the following
comarea
items:
cstatus
Set to nonzero value if call unsuccessful.
numerrs
May be decremented if new value replaces the value of a
field with an error.
fieldnum
Two-byte integer variable containing the field number assigned by
FORMSPEC to the field in the data buffer to which the value is copied.
variable
Variable of specified type in an application that contains the value to be
converted to USASCII and copied to a field in the data buffer.