GETIME (Get the Time) Macro

The macro obtains the time-of-day at any time during program execution.

STANDARD and LOCAL are assumed if no operands are given. If the macro is issued without an operand, the macro must not contain a comment unless the comment begins with a comma.

If no DATE job control statement is supplied or CLOCK=YES is specified, the calendar date and the system date in the communication region are updated every time GETIME is issued. However, when the job stream contains a DATE job control statement, only the system date in the communication region is updated when GETIME is used; the calendar date is not changed in that case.

Format

Read syntax diagramSkip visual syntax diagramnameGETIMESTANDARDBINARYTUMIC,LOCAL,GMT,CLOCK=YES,MFG=area(S, area)( r)

Requirements for the caller

AMODE:
24 or 31
RMODE:
24 or ANY
ASC Mode:
Primary

Parameters

STANDARD | BINARY | TU | MIC
If you specify:
STANDARD
The system returns the time-of-day in register 1 as a packed decimal number of the form hhmmss, where:
  • hh = Hours
  • mm = Minutes
  • ss = Seconds

with the sign in the low-order half-byte. The time-of-day can be stored and unpacked or edited.

BINARY
The system returns the time-of-day in register 1 as a binary number of seconds.
TU
The system returns the time-of-day in register 1 as a binary number of units of 1/300 seconds.
MIC
The system returns the time-of-day in registers 0 and 1 as a binary number of microseconds. Bit 51 of the register pair indicates 1 microsecond. The specification of MIC forces the GMT operand.
LOCAL | GMT
Specify LOCAL to obtain the local time or GMT if, in your program, you want to use Greenwich mean time.
CLOCK=YES
Indicates that registers 0 and 1 contain, as input to GETIME, a value that was obtained with a STCK (store clock) instruction from the hardware time-of-day (TOD) clock:
STCK   TOD    (Store time-of-day into 8-byte TOD)
LM     R0,R1,TOD
GETIME ...,CLOCK=YES

The stored value is transformed into time and date as defined by the other operands and any associated job control statements. Additionally, the date is returned in registers 14 and 15 (in the form mmddyycc or ddmmyycc, where cc indicates the century).

MFG=area | (S,area) | (r)
The MFG operand is required if the program is to be reenterable and if option STANDARD applies (with the options BINARY, TU, or MIC, reentrancy is preserved in any case). MFG specifies the address of a 64-byte dynamic storage area, that is, storage which your program obtained through a GETVIS macro. This area is required for system use during execution of the macro.