DATTIM(a b)

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.
  • 4-digit base century must be the first argument. It defines the base century that ILE COBOL uses for its windowing algorithm. If the DATTIM process statement option is not specified, 1900 is used.

    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.

  • 2-digit base year must be the second argument. It defines the base year that ILE COBOL uses for its windowing algorithm. If the DATTIM process statement option is not specified, 40 is used.