Tips from Jackie
more pertinent question might be "How old will you be in the year 2000?". If you were born in 1969 then 2000 - 1969 = 31 years old. On the other hand 00 - 69 = -69 years old. Since we intuitively know that ages are always positive we will often just ignore the sign.
This would make you 69 years old very shortly. By now you should realize that this is an example of the Year 2000 challenge facing all of us in the IT industry. Some of the many problems that could easily occur would be credit card companies refusing transactions because cardholders appear delinquent in their payments or utility companies cutting off service to their customers who appear to have not paid their bills.
You should be aware that you probably have ambiguous dates in your system today. What does a year of 96 mean? Is it 1896, 1996, 2096.... ? Do you hard code '19' on reports for the century? Does the date 12/31/99 mean something special like "no expiration date"? Does the year 00 imply "unknown year" in your data? Another interesting question: Is the year 2000 before or after 1999? 2000 > 1999 but 00 < 99. Which way would your programs evaluate this and how would the data be sorted?
Computers and computer applications need to be made Year 2000 safe. This means that the system and the applications must act correctly when performing functions such as date arithmetic, date comparisons, date sequencing, date formatting and calculating the day of the year or of the week. The latest release of OS/400 is Year 2000 safe. While this does NOT make your applications safe it does enable you to program Year 2000 safe applications. You are going to have to make some choices when deciding how to solve this problem.
One possibility is to use the data type "date" instead of packed, zoned or character. This requires you to convert all your programs and data to the "date" data type format. The default "date" format is *ISO YYYY-MM-DD but you can change this using the DATFMT keyword into *USA MM/DD/YYYY. If you are using ILE RPG you have access to great opcodes for date arithmetic.
Another option is to change all your dates from 2 positions to 4 in both your programs and your data. A third choice is to use the V3R2 system value QCENTURY. This value is '0' if the current year is 19YY and '1' if the year is 20YY. You can chose store your dates with an embedded century code CYYMMDD.
Other options are discussed in the manual referenced at the end of this column. You should start coding new applications to be Year 2000 safe. Be careful, UDATE and UYEAR provide a 2-digit year. *DATE and *YEAR support a 4-digit year. Using the TIME operation to retrieve the system date allows you to define either a 2-digit or a 4-digit year. SQL date, time and time-stamp data type support provide for 4-digit years.
The COBOL ACCEPT statement supports only a 2-digit year when referencing DAY or DATE. SQL provides COBOL with support for 4-digit years.
IBM recognizes that the Year 2000 Challenge is a major concern for all companies. IBM is currently offering an impact analysis service for their customers. For bedtime reading I highly recommend "The Year 2000 and 2 Digit Dates: A Guide for Planning and Implementation" GC28-1251.
It can be found at:
Jackie Jansen is an AS/400 Specialist and Consulting SE, providing national technical and marketing support for the AS/400 in Canada. Jackie frequently speaks at AS/400 Technical Conferences and User Group meetings.