Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)

184 Chapter 10
Technical Articles
Year 2000 and Other Enhancements in VPLUS
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.
FORMSPEC Enhancements
FORMSPEC Application Ready Buffer (ARB) processing has been
enhanced with the addition of a new ARB data type. This data type can
be specified on the DTC Menu for Data Type Conversions from Screen
Type to Application Type. The new ARB Type is YYYYMD and is defined
as a 8-byte ASCII field containing a date value in YMD order with no
separators. Also the year component in the date value has 4 digits. Note
that FORMSPEC will ensure a length of 8 for the data type YYYYMD in the
ARB. In essence, the value is of the form YYYYMMDD (8 bytes) even
though the Type designator on the DTC Menu has been abbreviated to
YYYYMD.
For more details on ARB Types and how to use them, refer to the “ARB
Data Types” section in the Data Entry and Forms Management System
VPLUS Reference Manual.
Processing Enhancements
Date processing in VPLUS has been enhanced to handle date values
with 4-digit year components. Specifically, the following additions have
been made.
Date output will be formatted with 4-digit years if the target field is
wide enough to receive the date, and the user requests this action.
Examples of such output include the SET statement in FORMSPEC. The
target field should be at least 10 characters in length to have a 4-digit
year output.
VPLUS, by default, will format date output with 2-digit years. To
change the behavior as described above, define a JCW called
VSETNEXTCENTURY and set bit 15 to 1 (bits are numbered from 0
through 15). It should be noted that this option will be active for fields
wide enough to hold the 4-digit year date. For other fields, 2-digit years
will be used.
Existing 2-digit years can be interpreted differently to handle dates in
the next century. Currently VPLUS handles year components 00-99 as
1900-1999. This scheme of interpretation can be changed. In the new
scheme, 00-49 is interpreted as 2000-2049 and 50-99 is interpreted as
1950-1999. This interpretation will be valid through all processing done