As the use of a CYMD format for the passing of dates from commands to CPPs originated with the S/38 I doubt that there would be too many people monitoring this list that were involved in the decision. When that type of decision would have been made I was still in college (though I was with IBM when the S/38 became available so I'm not all that young either!).
For all I know it was a convention coming out of S/3 CCP and used for compatibility reasons -- which would make finding someone involved in the decision even harder :-)
But if I were to make a guess (and that's all this is), old-timers might recall back when the S/38 first came out how it was stressed time after time to use an odd number of decimals when working with numeric data in packed form due to performance implications. I can easily imagine some designer way back when, even before we found out that the initial models were perhaps a bit underpowered, mentioning the performance advantage of using an odd number of digits. And then some developers taking this to heart and implementing a CYYMMDD format in order to optimize performance in applications electing to store the dates. But again, this is just a guess.
Bruce Vining
qsrvbas@xxxxxxxxxxxx wrote:
Buck wrote:
Tom wrote:
I would have thought that *CYMD was primarily for support of date
parameters from *CMDs where the CPP was written in RPG. I wouldn't have
expected that it would be used often for persistent storage.
There are several packages that use *CYMD. Cool:2E (formerly known as
Synon) used that format too. The packages and Synon predate the advent
of true date data types.
I don't doubt it. I was thinking more of IBM's driving motivation
for creating the format in the first place. I can't guess at the
motivations of developers who used it as an application attribute.
Date fields aren't perfect, in particular the validity checking is
unusual for RPG programmers.
Many years back, I was using QWCCVTDT as my fundamental
validity-checker for dates. It wasn't always a straightforward API
to use; but I always figured it's better to have IBM on the hook for
making it work. If nothing else, it gave a reliable indication of
validity.
Once a date is known to be "valid" as an actual date, there might be
other tests such as within a range of dates, after specific
day-of-month or whatever. But the additional tests are generally
'business rules' rather than according to common standards.
I'm not sure what to say about developers who can't implement
'business rules' in the language that they work in.
Tom Liotta
As an Amazon Associate we earn from qualifying purchases.