Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
182 Chapter 10
Technical Articles
Year 2000 and Other Enhancements in VPLUS
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
VGETYYYYMMDD:
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.
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 into which the
converted value is placed
Discussion
VGETYYYYMMDD transfers the contents of the field specified by fieldnum
to a variable in an application. The contents of the field are stored in a
data buffer from which the value is taken. This value is converted to
YYYYMMDD format and the converted value is placed in the application
variable. The YYYYMMDD format is an 8-byte ASCII value, for example,
19961225.
If errors occur during conversion, cstatus is set to an error code. If the
requested field has an error, its value is moved to the variable but
cstatus is set to an error code.
Refer to the VGETtype intrinsic description in the Data Entry and
Forms Management System VPLUS Reference Manual for related
information.
Example
COBOL
CALL "VGETYYYYMMDD" USING COMAREA FIELDNUM VARIABLE.
SPL
VGETYYYYMMDD(COMAREA,FIELDNUM,VARIABLE);
These calls will convert the contents of the data buffer corresponding to
the field specified by FIELDNUM and place the converted value into
VARIABLE.