TIMFMT (Time Format) keyword for physical and logical files

Use this field-level keyword to specify the format of a time field. This keyword is valid for either time fields (data type T) or zoned fields (data type S) whose corresponding physical file fields are 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 for a physical file, the default is *ISO.

If you do not specify the TIMFMT keyword for a logical file, the default is the time format from the physical file.

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

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

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         TIMFMT(*ISO)
00040A            TIMFLD2         T         TIMFMT(*USA)
     A

If the current time is 2 o'clock p.m., the system time format is hhmmss, and the system time separator is ':', TIMFLD1 contains 14.00.00. TIMFLD2 contains 2:00 PM.