× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



According to the documentation found at

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/nls/rbagsmstpdf.pdf

<blockquote>

The year (QYEAR) system value specifies the last 2 digits of the year
on the system. This value ranges from 0 through 99. The system assigns
the first two digits for the year based on the current setting for the
QCENTURY system value. If the calculated year falls outside the range
of dates supported by the system (1928 to 2053), the QCENTURY system
value is changed so that the calculated year is within the supported
range.

If you change this system value:
- QCENTURY is set to 0 if QYEAR is 54 to 99
- QCENTURY is set to 1 if QYEAR is 00 to 27

For example, if you change QYEAR from 95 to 13, the system changes
QCENTURY from 0 to 1, indicating a year of 2013. However, if you
change QYEAR from 95 to 45, the system will not change QCENTURY,
because both 1945 and 2045 are valid dates.

</blockquote>

This is fascinating to me. If QYEAR is 95, then the full year must be
1995, and QCENTURY must be 0. That last sentence says that if you then
force QYEAR to be 45, then QCENTURY *does not change*. Meaning
QCENTURY stays at 0. Which I guess means the full year has changed to
1945?

I have some adjectives other than "fascinating" for this system, but I
won't get into them here. I am just wondering if the QYEAR, QDATE, and
QCENTURY system values have been modified to support dates far into
the future (say, 2118), and if not, whether there are any plans to do
so. For example, in principle QCENTURY could be extended to support
values other than 0 and 1. Also, will there ever be an actual 4-digit
year or 8-digit date system value?

Finally, is there a "canonical" way to get the 4-digit system year or
8-digit system date today? Is it "inspect QCENTURY and add 19 to get
the first two digits of the year"?

I found some more information from none other than CRPence:

https://archive.midrange.com/midrange-l/201309/msg00863.html

It was encyclopedic, but I couldn't glean any guidance from it.

I realize all this is academic. As Chuck says, for use as a *system*
date, there is no practical need to support a wide date range. But I
like to write programs which could theoretically operate up to Y10K.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.