Sometimes you may not be able to avoid moving dates between 4-digit and 2-digit years, and you know that inaccuracy will result based on the default windowing algorithm that ILE COBOL uses. You can use the DATTIM process statement option to change the default date window. DATTIM takes the form:
DATTIM(a b)
where a is the 4-digit base century and b is the 2-digit base year.
The 4-digit-base-century also affects the interpretation of the @C conversion specifier. The @C conversion specifier represents a 1-digit century, whose value ranges between 0 and 9. A 0 for a 1-digit century represents a base century of 1900, 1 = 2000, ... 9 = 2800. So, a date data item whose format is @C/%y/%m and whose value is 1/12/05, represents year 2012, the first day of month 5 (May). However, 0 of @C is really equal to the 4-digit base century. Thus, a DATTIM(2200, 40) would cause 0 = 2200, 1 = 2300 ..., 9 = 3100.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.