TIMFMT (Time Format) keyword for display files

You use this field-level keyword to specify the format of a time field. This keyword is valid for time fields (data type T).

The format of the keyword is:
TIMFMT(time-format)

The following table describes the valid time formats and their default separators.

Format name Time format parameter Time format and separator Field length Example

Hours:Minutes:Seconds

*HMS

hh:mm:ss

8

14:00:00

International
Standards Organization

*ISO

hh.mm.ss

8

14.00.00

IBM USA Standard

*USA

hh:mm AM or
hh:mm PM

8

2:00 pm

IBM European Standard

*EUR

hh.mm.ss

8

14.00.00

Japanese Industrial
Standard Christian Era

*JIS

hh:mm:ss

8

14:00:00

If you do not specify the TIMFMT keyword, the default is *ISO.

If you specify the time-format parameter value as *ISO, *USA, *EUR, or *JIS, you cannot specify the TIMSEP keyword. These formats have fixed separators.

The format of DFT, DFTVAL, and MAPVAL keyword values must match the format that the TIMFMT keyword specifies. If the TIMFMT keyword is set to *ISO as default, these values must have a format of *ISO.

The TIMFMT keyword overrides the job attribute for a time field. It does not change the system default.

It is the responsibility of the high-level language and the application to format the time field according to the format specified for the TIMFMT keyword and use the separators specified on the TIMSEP keyword. The system does not format fields on output. The system validates the time field on input according to the format the TIMFMT keyword specifies and the separator that the TIMSEP keyword specifies.

Option indicators are not valid for this keyword, although you can use option indicators to condition the field for which it is specified.

Example

The following example shows how to specify the TIMFMT keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A
00020A          R RECORD
00030A            TIMFLD1         T  B  5  2TIMFMT(*ISO)
00040A            TIMFLD2         T  B  5 22TIMFMT(*USA)
00050A            TIMFLD3         T  B  5 42TIMFMT(*HMS) TIMSEP(',')
     A

If you want to display 2 o'clock p.m., the following values are displayed where RECORD1 appears.

TIMFLD1    14.00.00
TIMFLD2    02:00 PM
TIMFLD3    14,00,00