TIME (Time) keyword for display files

You use this field-level keyword to display the current system time as a constant (output-only) field.

This keyword has no parameters.

You can specify only the location of the field, TIME, and optionally, the EDTCDE, EDTWRD, COLOR, DSPATR, or TEXT keyword. Positions 17 through 38 must be blank.

The edit word '0_:__:__' (_ represents a blank) is assumed for a TIME field. You can specify another edit word or one of the user-defined edit codes (5 through 9) to change the IBM-supplied editing.

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

Example

The following example shows how to specify the TIME keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A  20                              1 56TIME
00020A  21                              1 56TIME
00030A                                      EDTWRD('0 &HRS&;  &MINS&;  &SECS')
     A

In this example, the system time is 110645.

  • If option indicator 20 is on, the time is displayed as:
    11:06:45
  • If option indicator 21 is on (and option indicator 20 is off), the time is displayed as:
    11 HRS 06 MINS 45 SECS