Define the Structure and Base Year for YY Dates

The 'YY' Dates Date Structure constant specifies the structure to be used for COBOL data items that were associated with a six-digit date transform when the catalog was designed, and the 'YY' Base Year constant specifies the base year used to interpret date values containing a two-digit year.

The six-digit date transform is specified during catalog design when the structure of end-user COBOL dates, with two-digit years, varies for different end-user sites. Each end-user site can set this variable to the structure used in its files. The default structure is YYMMDD (a two-digit year, followed by a two-digit month of the year, followed by a two-digit day of the month).

The default base year is 1900, and is added to a two-digit year value obtained from a COBOL data item when computing a column date value and is subtracted from the column date year value when computing a COBOL data item that contains a two-digit year.

Additionally, if you have six-digit dates that span centuries, use the Use 'YY' Century Cutoff constant to specify the century cutoff year, which is used to interpret date values containing a two-digit year that are considered to be in the next century if lower than the specified cutoff.

The default value is 1900. Using the default, all two-digit years are considered to be in the twentieth century (nineteen hundreds). If the value of 'YY' Century Cutoff is greater than 1900, then the value of 'YY' Base Year must be equal to 1900. The value of 'YY' Century Cutoff is only used when it is greater than 1900.

  1. On the Tools menu, click Date Constants.

    The Date Constants tab is displayed.

  2. In the 'YY' Dates section, in the Date Structure field, select one of the available structures:
    • YYMMDD
    • MMDDYY
    • DDMMYY
  3. Select Use 'YY' Base Year, and in the Base Year field, enter a value (up to four digits) for the base year.
  4. If you have six-digit dates that span centuries, select Use 'YY' Century Cutoff, and in the Century Cutoff field, enter a value (up to four digits) for the cutoff.

    For example, setting this constant to 1930 would cause any two-digit years between 0-29 to be interpreted to be in the next century (for example, 2029).

  5. Click Save to save the changes to the catalog.
    Tip: If you click Defaults, the structure reverts to YYMMDD, the base year reverts to 1900.