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

Chapter 9 127
Year 2000 Enhancements
New Date Intrinsics for MPE/iX
Special Date Values
Special date values to represent UNKNOWN, INVALID, NEVER,
NEEDED, EXPIRED, and ILLEGAL dates are defined for dates in “HP
standard formats.” The following table captures this date value
information. The other date formats have been in existence for some
time and hence the special date values are not defined for them. These
special dates, when passed to the HPDATEFORMAT intrinsic, will result
in a corresponding output string. For example, passing "00000103" to
HPDATEFORMAT will result in the output string: “NEEDED”.
When special dates are passed to HPDATECONVERT, HPDATEOFFSET,
and HPDATEDIFF intrinsics as input dates, an error status is returned
and the output date is initialized to a binary zero value or a blank
string, depending on the date type of the output date.
Table 9-5 Special Date Values
New Date Intrinsics
The date intrinsics support dates in the range 0001-01-01 through
9999-12-31. They use the Gregorian calendar for all calculations beyond
1753. The calendar followed by the intrinsics ignores the fact that
calendars in different countries changed at different times and some
dates were dropped from the calendar (around the year 1753). The
validity of dates prior to 1753 cannot be guaranteed. All intrinsics
accept byte-aligned input/output date parameters, and all these
intrinsics are NM callable.
On an error, the intrinsics initialize the output parameters to either a
binary zero or a blank string depending on the type of the parameter.
Though the date type “4” can represent years beyond 9999, a year
beyond 9999 (which needs five digits/characters) is considered an error.
It is recommended that character array based output date parameters
are initialized to blanks before passing them as arguments to these
intrinsics.
New errors and warnings are documented in the System Message
Catalog, SYSCAT.PUB.SYS, under the date intrinsics subsystem
number 529.
Data
Type
Format
Un-
known
Invalid Never Needed Expired Illegal
4 YYYYDDD 0 0000367 0000368 0000369 0000370 0000371
18 YYYYMMDD 0 00000101 00000102 00000103 00000104 0000105
38 YYYYMMDD “blank” “0000010” “00000102” “00000103” “00000104” “0000105”