WAIT Statement

The WAIT statement suspends a program until a designated condition occurs. The program can be suspended until a given length of time elapses, an event is caused, a previously initiated direct I/O statement is finished, a software interrupt occurs, or a signal occurs.

<wait statement>

── WAIT ─┬────────────────────────────────────────────────────────────┬──► 
         └─┬────────────────────────┬─ ( ─<wait parameter list>─── ) ─┤ 
           ├─[ <wait option list> ]─┘                                 │ 
           └───────────────── ( ─<direct array row>─ ) ───────────────┘ 
►─┬─────────────────────────┬──────────────────────────────────────────┤
  └─ [ ──<start index>── ] ─┘

<wait option list>

──┬─ DSABLE ────────┬──────────────────────────────────────────────────┤
  └─ INTERRUPTIBLE ─┘

<wait parameter list>

──┬─ ( ──<time>── ) ─┬───────────────────┬─────────────────────────────┤
  │                  └─ , ──<event list>─┤
  └─<event list>─────────────────────────┘

<time>

──<arithmetic expression>──────────────────────────────────────────────┤

<event list>

  ┌◄──────────── , ───────────┐
──┴─┬─<event designator>────┬─┴────────────────────────────────────────┤
    ├─<core-to-core event>──┤
    └─<storage queue event>─┘

<core-to-core event>

──┬─ CRCR_INPUT ──┬─<core-to-core program name>────────────────────────┤
  └─ CRCR_OUTPUT ─┘

<core-to-core program name>

──┬─<EBCDIC array row>──────┬──────────────────────────────────────────┤
  └─<EBCDIC string literal>─┘

<storage queue event>

──┬─ STOQ_INPUT ──┬─<storage queue identifier>─────────────────────────┤
  └─ STOQ_OUTPUT ─┘

<storage queue identifier>

──<EBCDIC array row>───────────────────────────────────────────────────┤

<start index>

──<arithmetic expression>──────────────────────────────────────────────┤

If the WAIT statement consists solely of WAIT, an operating system procedure is called that suspends the program until an attached and enabled interrupt is invoked as a result of the associated event being caused. For more information, refer to INTERRUPT Declaration. This form of the WAIT statement cannot be used as a function.