A date field can be any of the following:
The term date field refers to both expanded date fields and windowed date fields.
A windowed date field is a date field that contains a windowed year. A windowed year consists of two digits, representing a year within the century window.
An expanded date field is a date field that contains an expanded year. An expanded year consists of four digits.
The main use of expanded date fields is to provide correct results when these are used in combination with windowed date fields; for example, where migration to four-digit year dates is not complete. If all the dates in an application use four-digit years, there is no need to use the millennium language extensions.
A year-last date field is a date field whose DATE FORMAT clause specifies one or more Xs preceding the YY or YYYY. Year-last date fields are supported in a limited number of operations, typically involving another date with the same (year-last) date format, or a nondate.
Date format refers to the date pattern of a date field, specified either:
The meaning of the term compatible, when applied to date fields, depends on the COBOL division in which the date field occurs:
A windowed date field can be subordinate to an expanded date group data item. The two date fields are compatible if the subordinate date field has USAGE DISPLAY, starts 2 bytes after the start of the group expanded date field, and the two fields meet at least one of the following conditions: