The year data formats that can be used with INCLUDE/OMIT are Y2B, Y2C, Y2D, Y2P, Y2S and Y2Z. Year data formats can only be compared to other year formats; they cannot be compared to formats in the table above.
The full date formats that can be used with INCLUDE/OMIT are Y2T, Y2U, Y2V, Y2W, Y2X, and Y2Y. The full date formats may only be compared to other 2-digit year full date formats with the same number of non-year digits.
The year data formats work with the CENTWIN run-time parameter or installation option to define a 2-digit year value that is to be treated as a 4-digit year. CENTWIN defines a sliding or fixed 100-year window that determines the century to which 2-digit year data belong when processed by INCLUDE/OMIT and other control statements.
The year data formats and CENTWIN ensure that century evaluation is applied to INCLUDE/OMIT comparison conditions involving 2-digit year data. For example, without CENTWIN processing, an INCLUDE/OMIT comparison would treat the year 01 as "less than" the year 98. With CENTWIN processing, the 01 field could be recognized as a twenty-first century date (2001), which would be treated as "greater than" 98 (1998).
For details on the CENTWIN option, see CENTWIN. For details on the year data formats, see CENTWIN Parameter (Optional). For an example of an INCLUDE control statement with a condition involving a year data field, see the figure Sample INCLUDE Control Statement with CENTWIN Processing.
For any of the 2-digit year formats, it is valid to compare them with any of the other formats. Specifically, Y2B, Y2C, Y2D, Y2P, Y2S, and Y2Z fields can be compared to each other.
Date Form | Length and Data Format Allowed |
---|---|
yyx and xyy | 3,Y2T 3,Y2W 2,Y2U 2,Y2X |
yyxx and xxyy | 4,Y2T 4,Y2W 3,Y2V 3,Y2Y |
yyxxx and xxxyy | 5,Y2T 5,Y2W 3,Y2U 3,Y2X |
yyxxxx and xxxxyy | 6,Y2T 6,Y2W 4,Y2V 4,Y2Y |