IBM OS/390 User Manual

Page of 673
Wait Handling
This method of using the interval timer allows you to set the timer and wait for
the time to elapse. The job or task is prevented from executing until the interrupt
occurs.
┌─────┬──────────┬──────────────────────────┐
│ TECB
│ SETIME
seconds , ─ecbname
│ VSE │
(1)
(2-12)
│ WAIT
─ecbname
(1)
├─────┼──────────┼──────────────────────────┤
│ WAIT ,DINTVL = address
(2-12)
,BINTVL = address
│ MVS │ STIMER
(2-12)
,TUINTVL= address
(2-12)
,TOD = address
(2-12)
└─────┴──────────┴──────────────────────────┘
The VSE TECB is an event control block that records the status of the timer.
When the interrupt is received, this condition is posted in the specified TECB.
The WAIT macro tests the TECB status and determines if the interrupt has
occurred.
The MVS STIMER macro provides basically the same facility. The difference is
that, under VSE, you can insert code between the point where the timer is
initiated (SETIME) and where the test for the interrupt is performed (WAIT). The
wait is automatically built into the MVS STIMER macro. The WAIT parameter
indicates that you do not want the coding below the macro to be executed during
the time period. The DINTVL parameter is explained under “Routine Handling”
on page 287.
TTIMER Macro
The VSE and MVS TTIMER macros are compatible with each other:
┌─────────┬───────────┬─────────────┐
│ VSE
TTIMER
│ CANCEL
├─────────┼───────────┼─────────────┤
│ MVS
TTIMER
│ CANCEL ,TU
└─────────┴───────────┴─────────────┘
The VSE time interval is expressed in binary in hundredths of a second, while
under MVS, the interval is expressed in binary in timer units (one timer unit
equals 26.04166 microseconds).
13.2.3.2 Operator Communication Interrupts
┌─────┬───────────┬───────────────────────────────────┐
│ STXIT
│ OC, rou─ine address
,
savearea
│ VSE │
(0)
(1)
│ EXIT
│ OC
└─────┴───────────┴───────────────────────────────────┘
288
VSE to OS/390 Migration Workbook