HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 341
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VPUTYYYYMMDD
Converts a numeric value representing a date from an application and copies the
converted value to a field in the data buffer in memory.
Syntax
VPUTYYYYMMDD {
comarea,fieldnum,variable
}
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 VPUTYYYYMMDD:
cstatus
set to zero.
comarealen
set to total number of two-byte words in
comarea
. Must be
at least 70 words in length.
VGETYYYYMMDD may set the following
comarea
item:
cstatus
set to nonzero value if call is unsuccessful or requested
field has an error.
numerrs
may be decremented if the new value replaces the value of
a field with an error.
fieldnum
is a two-byte integer variable which specifies the number assigned to the
field by FORMSPEC.
variable
is a character string in the application which contains the value to be
converted.
Discussion
VPUTYYYYMMDD converts the contents of the application variable to the date order of the
field specified by
fieldnum
and copies the converted value into the corresponding field in
the data buffer, right justified. The application variable should contain a numeric value in
YYYYMMDD format. The YYYYMMDD format is an 8-byte ASCII value, for example, 19961225.
If errors occur during conversion,
cstatus
is set to an error code.
Refer to the VPUTtype intrinsic description in the Data Entry and Forms Management
System VPLUS Reference Manual for related information.
Example
COBOL
CALL "VPUTYYYYMMDD" USING COMAREA FIELDNUM VARIABLE.
SPL
VPUTYYYYMMDD(COMAREA,FIELDNUM,VARIABLE);
These calls will convert the contents of VARIABLE to a date value and place the converted
value in the data buffer corresponding to the field specified by FIELDNUM.