A century window is a 100-year interval, such as 1950-2049, within which any two-digit year is unique. For windowed date fields, you specify the century window start date by using the YEARWINDOW compiler option.
When the DATEPROC option is in effect, the compiler applies this window to two-digit date fields in the program. For example, given the century window 1930-2029, COBOL interprets two-digit years as follows:
To implement this century window, you use the DATE FORMAT clause to identify the date fields in your program and use the YEARWINDOW compiler option to define the century window as either a fixed window or a sliding window:
For example, YEARWINDOW(1950) defines a fixed window of 1950-2049.
For example, YEARWINDOW(-50) defines a sliding window that starts 50 years before the year in which the program is running. So if the program is running in 2010, the century window is 1960-2059; in 2011 the century window automatically becomes 1961-2060, and so on.
The compiler automatically applies the century window to operations on the date fields that you have identified. You do not need any extra program logic to implement the windowing.
related references
DATEPROC
YEARWINDOW
DATE FORMAT clause (COBOL for AIX Language Reference)
Restrictions on using date fields (COBOL for AIX Language Reference)