DATE FORMAT Clause

The COBOL DATE FORMAT clause specifies that a data item is a date field. Some formats do not specify whether day or month comes first. In such cases this is determined by the Day First field of the Copybook connection.

In JSON date fields are represented by strings in YYYY-MM-DD format.

Not all COBOL formats contain full year, month, and day. For example, YY only contains a two-digit year. In such cases, when the date is parsed, the missing date parts are defaulted to the lowest values: day 1, year 0001, and month of January.

When one of the incomplete formats is rendered, the date parts in JSON that are absent in COBOL DATE FORMAT are ignored.

Two-Digit Year

Two-digit year format is processed in accordance with the Base year for two-digit year setting in the Copybook connection. This value acts as the base-year in YEARWINDOW(base-year) option of the COBOL compiler.

You must specify it with one of the following values:

DATE FORMAT on a Group Level

The connector does not support DATE FORMAT at group level. It is ignored in such cases.