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, with a century window of 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:
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 Windows Language Reference)
Restrictions on using date fields
(COBOL for Windows Language Reference)