Y2K Millennium Compliance - University of Delaware


Year 2000 Software Solutions


Introduction to the Problem and Solutions

Example Program

We present the concepts of Find/Analysis, Remediation, and Testing by applying them to a sample Fortran program. We have selected a sample program that solves a trivial problem so that we can concentrate on the methods to solve the Year 2000 problem without getting bogged down in the details of a complex program.

The Fortran program, samp1.f, reads the names and birth dates of two individuals and computes the older of the two. The program reads in the dates using 2-digit year representation with format MMDDYY. Try running the program with the sample data set shown. Note that the results for the second data set gives an incorrect answer because this program is not Year 2000 compliant.

Find/Analysis


Remediation

Testing

For the testing phase of the Year 2000 remediation process, we refer you to Michael Wheatley's testing section of "Effective Remediation Strategies".

System Date Routines

We have not discussed the compliance of system date routines under the assumption that such routines are, or will be, Year 2000 compliant. However, if you are using or intend to use system routines, it is important to recognize their limitations.

For example, in C, you can extract the components of a date string using the "getdate" command. The entries in the string must conform to one of the formats within a template file (see the man pages for details on "getdate" and the template file). For example, your program may read data from an input file with records in one of the following forms:


	January 1 1988 10:45 pm
	1/1/1988 10:45 pm
	1/1/88 22:45:00

and extract the month, day, and year components using the "getdate" routine. There are restrictions on both the 2-digit years and 4-digit years because at the system level, time is computed in seconds from the year 1970 and stored in an integer variable. For example, on Copland, under Solaris 2.7, this restricts 2-digit years to the range 1970 to 2037 and 4-digit years to 1902 to 2037. The exact limits on this range may vary from system to system (e.g., under Solaris 2.5, 4-digit years are restricted to the range 1970 to 2037). If your program processes 2-digit year dates and uses a system routine to process this data, you need to verify that the program is producing yearly data as expected.

For example, consider the program, test5.c. This program uses the "getdate" routine as described above. Try some test data including 2-digit years during and outside the range of 1970 to 2037 as input to program test5.

Summary

The best solution, independent of time constraints, complexity, etc. is expansion. It is permanent, and it is clean. No artificial logic need be introduced into your program as is done when you use any of the windowing techniques. However, it is generally the most difficult of the remediations to apply primarily because it requires you to modify all input data and program constants from 2-digit to 4-digit values, which can be time consuming. Windowing can be a much easier method to invoke when you have many large files containing date data. It is limited in that the window cannot exceed 100 years. Compression gets around the 100 year limitation as does expansion. However, it is not user friendly and may cause data errors. There is no best method. It depends on your program, the amount of effort you want to put into the remediation, and the amount of time you have to put into the process. Even considering our simple small test program, samp1.f, the easiest fix was compression leading to samp1comp.f. Only two lines in the program needed to be changed. But, do we want to deal with hexadecimal values? If we use the bridge program, bridge.f, we can input base 10 data, but we are constrained to a 100 year window, just as if we used window remediation. Actually, the bridge was intended to bridge over the incompatibility between a base 10 year data set and our remediated program until we had time to convert the data file to hexadecimal. Every method has its advantages and disadvantages.

For additional information on the Year 2000 problem, see the Year 2000 Links page.




YEAR 2000 READINESS DISCLOSURE


University of Delaware Year 2000 Compliance Home Page

URL of this document: http://www.udel.edu/topics/software/general/y2k/y2ksoftware.html
Last modified: 3/3/1999
Copyright (c) 1998, University of Delaware.

Questions, comments or suggestions

This page has been accessed times.