Bob, I suspect that it was just a case of "it just wasn't requested in
the programming specs..."
On date conversions, the TSO based REXX does not allow conversion from
an input date for the CENTURY and JULIAN functions.
Other versions of REXX do support converting from all supported date
formats to any other date format.
Furthermore, the julian function returns a value formatted like yyddd,
which will create other problems as you approach the year xx49/xx50
The JULIAN option should have returned a yyyyddd value, and I suspect
that it remained 2-digit for compatibility reasons. Of course, nobody
thought ahead to prevent another variation of the Y2K type problems. I
would have suggested a different option keyword to get a yyyyddd type value,
had I been asked.
Likewise there is a basic restriction under TSO that a date_format_2
(input value) --MUST-- be in a format that could have been output by the
DATE() function. I also find it absurb that the "DD" portion of the DD
MON YEAR format CANNOT start with a ZERO or Space. (The design
philosophy should have been be user friendly, and they should have
continued Mike Cowlishaw's principal of "least astonishment"...)
Many of the non-mainframe versions of rexx only support the
"day-of-year" as a "julian" like value, and option "D" is used to
request a return value of "ddd" -- just like is provided in the TSO
version of the REXX language...
The maximum return value for CENTURY is 36524 except every fourth
"century leap year" (one that is divisible by both 100 and 400) when the
maximum value returned becomes 36525.
Conveniently, that value be represented as a 16-bit value, so that
function could have operated correctly across all platforms.
It would appear that the date() function was written to match somebodies
exact program specifications, so if conversion was not requested
in the program specs, options just weren't provided.
Any IBM customer, could request additional options, but I'm not willing
to guess how long it might take the REXX development group to actually
supply any newly requested options.
/s/ Bill Turner, wb4alm