Use this field-level keyword to specify the format of a date field.
This keyword is valid only for date fields (data type L) or for logical file
zoned fields (data type S), packed fields (data type P), or character fields
(data type A) whose corresponding physical file fields are date fields (data
type L).
The format of the keyword is:
DATFMT(date-format)
Other attributes of the DATFMT keyword specified for logical file fields
are:
- The packed (P), zoned (S), character (A), and date (L) data types for
logical file fields allow the DATFMT keyword.
- Field length may be specified for packed, character, and zoned logical
file fields, but must be a valid value listed in the table.
- If you do not specify the DATFMT keyword and the data type is L, the
default is the date format and field length from the corresponding physical
file field.
- For packed and zoned data types, the decimal positions (positions 36 and
37) must be blank.
- For the packed data type, two lengths are sometimes allowed for a
particular format. The larger length is better from a performance
perspective. If you do not specify a length, the smaller length is used
as the default.
Attributes of the DATFMT keyword that apply to both physical file fields
and logical file fields include the following:
- If you specify *JOB, the default is the job attribute and the field length
and is based on the job attribute without separators.
- If the DFT keyword is not specified, the default value is the current
date.
- If you specify the *ISO, *USA, *EUR, or *JIS value, you cannot specify the
DATSEP keyword. These date formats have a fixed separator.
- The DATFMT keyword overrides the job attribute for a date field. It
does not change the system default.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.