Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
Chapter 9 123
Year 2000 Enhancements
New Date Intrinsics for MPE/iX
New Date Intrinsics for MPE/iX
by M Gopalakrishnan
Commercial Systems Division
This release of the MPE/iX operating system has enhanced intrinsics
for handling date formats. These intrinsics are targeted to support
widely used existing date formats in MPE/iX and three new date
formats.
The date intrinsics are broadly categorized as follows:
• HPDATECONVERT—Converting dates from one supported format to
another.
• HPDATEFORMAT—Converting the supported format dates to the
display formats desired by the user.
• HPDATEDIFF—Determining the number of days that separate two
given dates.
• HPDATEOFFSET—Adding/subtracting an offset (days) to/from the
given date.
• HPDATEVALIDATE—Validating the given date for conformance to a
supported date format.
• HPCALENDAR, HPFMTCALENDAR—Using the new 32-bit HPCALENDAR
format.
The following sections will discuss various date formats and the syntax
and semantics of new date intrinsics. COBOL and Pascal programs
using these intrinsics are provided as examples.
Existing Date Formats
Existing date formats that are widely used are summarized in the
following table, “Existing Date Formats.” The column “Sortable?”
indicates whether the dates can be sorted (either numerically or
lexicographically depending on how they are stored). The last column
“Y2K Ready?” indicates whether dates in the format under
consideration can be used to represent dates beyond 1999-12-31. The
column “#Bytes” represents the number of bytes required to store the
date format.