The TTIMER macro tests the timer interval established by an STIMER macro. It also optionally cancels the remaining time interval.
If MIC is specified, the remaining time is returned to the doubleword area specified in the address. Bit 51 of the area is the low-order bit of the interval value and equivalent to one microsecond. If a time interval has not been set or has already expired, the area is set to zero.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 24- or 31- or 64-bit |
ASC mode: | Primary |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Must be in the primary address space |
For information about programs in 64-bit addressing mode (AMODE 64), see z/OS MVS Programming: Extended Addressability Guide.
Time intervals established via the STIMERM SET macro cannot be tested or cancelled with the TTIMER macro.
Before issuing the TTIMER macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service and restore them after the system returns control.
None.
The TTIMER macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede TTIMER. |
TTIMER | |
␢ | One or more blanks must follow TTIMER. |
CANCEL | |
,TU | Default: TU |
,MIC,stor addr | stor addr: RX-type address, or register (0) or (2) - (12). |
The ERRET parameter is obsolete and is ignored by the system. Therefore, the syntax and parameter descriptions for TTIMER no longer contain ERRET. However, the system still accepts ERRET and it is not necessary to delete it from existing code.
The parameters are explained as follows:
If WAIT was coded in the STIMER macro that established the interval, the task is not taken out of the wait condition and CANCEL is ignored.
For TU, the time is returned in register 0 as an unsigned 32-bit binary number. The low-order bit is approximately 26.04166 microseconds (one timer unit). If the time remaining is too great to be expressed in four bytes, the remaining time interval is set to the maximum possible value (X'FFFFFFFF') and the return code is set to 4.
For MIC, the time is returned in microseconds. The stor addr is the doubleword area on a doubleword boundary where the remaining interval is to be stored.
12E
See z/OS MVS System Codes for an explanation and programmer responses for this code.
When TTIMER macro returns control to your program, GPR 15 contains a return code.
Hexadecimal Return Code | Meaning and Action |
---|---|
00 | Meaning: Successful completion. Action: None. |
04 | Meaning: You specified the TU parameter,
but the time remaining is greater than X'FFFFFFFF'. Action: None required. However, you might take some action based upon your application. |
TTIMER CANCEL,TU
TTIMER ,MIC,OUTAREA
.
.
DS 0D
OUTAREA DC 2F