Version 4.2.6 for Mainframes (Update)
 —  Parameter Reference  —

DF - Date Format

With the DF session parameter, you determine the length of a date when converted to alphanumeric representation without an edit mask being specified. The DF parameter is evaluated at compilation time.

The sequence of the day, month and year components and the delimiter characters used are determined by the profile parameter DTFORM.

Possible settings S

8-byte representation with 2-digit year component and delimiters (yy-mm-dd).

With DF=S, only 2 digits are provided for the year information; this means that if the date value contained the century, this information would be lost during the conversion.

I 8-byte representation with 4-digit year component and no delimiters (yyyymmdd). * See Note.
L 10-byte representation with 4-digit year component and delimiters (yyyy-mm-dd). * See Note.
Default setting S
Applicable statements: FORMAT  

INPUT
DISPLAY
WRITE
PRINT

Parameter may be specified at statement level and/or at element level.

MOVE
COMPRESS
STACK
RUN
FETCH

Parameter may be specified at element level.
Applicable command: none

When the value of a date field is converted to alphanumeric format (for example, in a MOVE, DISPLAY, WRITE or INPUT statement) and no edit mask is specified for the conversion, the default date format as determined by the profile parameter DTFORM is used as edit mask. The same is true for the input validation of a date variable used in an INPUT statement: If no edit mask is specified, the input is validated according to the date format determined by the DTFORM parameter.

Note:
By using DF=I or DF=L, you can gradually change your applications to use 4-digit year representations and at the same time continue to make use of the flexibility provided by the profile parameter DTFORM.

See also Processing of Date Information, Date Format for Alphanumeric Representation - DF Parameter in the Programming Guide.

Top of page