Century window routines

To process 2-digit years in the year 2000 and beyond, Language Environment employs a sliding scheme called a century window where all 2-digit years lie within a 100-year interval. The default century window for Language Environment is set to start 80 years before the current system date. In the following example, 1993 is the current system date. The century window spans one hundred years from 1913 to 2012 where years 13 through 99 are recognized as 1913-1999 and years 00 through 12 are recognized as 2000-2012.

Figure 1. Default century window
In the example, the system date includes the years 1913 through 2012.

In 1994, years 14 through 99 are recognized as 1914-1999, and years 00 through 13 are recognized as 2000-2013. By year 2080, all 2-digit years would be recognized as 20xx. In 2081, 00 would be recognized as year 2100.

Some applications might need to set up a different 100-year interval. For example, banks often deal with 30-year bonds, which could be due 01/31/20. You can use the CEESCEN callable service (see z/OS Language Environment Programming Reference) to change the century window. For example, the following statement sets the default century to the 100-year interval starting 30 years before the system date, instead of the Language Environment default of 80 years:
Call CEESCEN(30, fc)
Figure 2. Using CEESCEN to change the century window
In the example, the system date includes the years 1963 through 2062.

A companion service, CEEQCEN, queries the current century window. A subroutine can, for example, use a different interval for date processing than the parent routine. Before returning, the subroutine resets the interval back to its previous value. For more information about changing the century window, see Examples illustrating calls to CEEQCEN and CEESCEN.