*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | TIME | | | Numeric field | | *---------*---------------*-----------------*----------------*---------------*
The TIME operation accesses the system time of day and, if specified, the system date at any time during program processing. The system time is based on the 24-hour clock.
The result field must specify the name of a 6-, 12- or 14-digit numeric field (no decimal positions) into which the time of day or the time of day and the system date are written.
To access the time of day only, specify the result field as a 6-digit numeric field. To access both the time of day and the system date, specify the result field as a 12- (2-digit year portion) or 14-digit (4-digit year portion) numeric field. The time of day is always placed in the first six positions of the result field in the following format:
If the system date is included, it is placed in positions 7 through 12 or 7 through 14 of the result field. The date format depends on the date format job attribute QDATFMT and can be mmddyy, ddmmyy, yymmdd, or Julian. The Julian format for 2-digit year portion contains the year in positions 7 and 8, the day (1 through 366, right-adjusted, with zeros in the unused high-order positions) in positions 9 through 11, and 0 in position 12. For 4-digit year portion, it contains the year in positions 7 through 10, the day (1 through 366, right-adjusted, with zeros in the unused high-order positions) in positions 11 through 13, and 0 in position 14.
The special fields UDATE and *DATE contain the job date. These values are not updated when midnight is passed, or when the job date is changed during the running of the program.
*...1....+....2....+....3....+....4....+....5....+....6....+....7... CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments++++++ C* C* When the TIME operation is processed (with a 6-digit numeric C* field), the current time (in the form hhmmss) is placed in the C* result field CLOCK. The TIME operation is based on the 24-hour C* clock, for example, 132710. (In the 12-hour time system, 132710 C* is 1:27:10 p.m.) CLOCK can then be specified in the output C* specifications. C TIME CLOCK 60 TIME OF DAY C* When the TIME operation is processed (with a 12-digit numeric C* field), the current time and day is placed in the result field C* TIMSTP. The first 6 digits are the time, and the last 6 digits C* are the date; for example, 093315121579 is 9:33:15 a.m. on C* December 15, 1979. TIMSTP can then be specified in the output C* specifications. C TIME TIMSTP 120 TIME STAMP C MOVELTIMSTP TIME 60 C MOVE TIMSTP SYSDAT 60 C* This example duplicates the 12-digit example above but uses a C* 14-digit field. The first 6 digits are the time, and the last C* 8 digits are the date; for example, 13120001101992 C* is 1:12:00 p.m. on January 10, 1992. C* TIMSTP can then be specified in the output specifications. C TIME TIMSTP 140 TIME STAMP C MOVELTIMSTP TIME 60 C MOVE TIMSTP SYSDAT 80
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.