z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Asynchronous exit routines

z/OS Communications Server: SNA Programming
SC27-3674-00

Asynchronous exit routines, in contrast to inline exit routines, do not act as extensions to the part of the application program that was executing when the event associated with the exit routine occurred. The events that cause invocation of asynchronous exit routines are unpredictable, whereas inline exit routines can be invoked only at predictable points (that is, immediately after the associated CHECK or RPL-based macroinstruction).

Asynchronous exit routines can interrupt the mainline program at any time, even if the mainline program is currently suspended (for example, because it issued a CHECK or WAIT macroinstruction). However, with the exception described in the next paragraph (TPEND with reason code 8), no asynchronous exit routine can interrupt another asynchronous exit routine; thus, each asynchronous exit routine must return to VTAM® before the next asynchronous exit routine can be given control. When an asynchronous event occurs, the associated exit routine (if defined by the application program) is scheduled by VTAM. If the mainline program is currently in control, execution of the mainline program is suspended and control is immediately given to the exit routine. If another asynchronous exit routine is in control, that exit routine must return to VTAM before the next exit routine can be given control. If the asynchronous exit routine currently in control suspends execution (for example, by issuing CHECK or WAIT), it prevents other asynchronous exit routines from gaining control. When the final asynchronous exit routine returns to VTAM, the mainline program resumes control at the point where it was interrupted.

The TPEND exit routine does not obey the preceding rules. It can interrupt any part of the application program, including another asynchronous exit routine, at any time. It must return to VTAM before the interrupted asynchronous exit routine or mainline program can resume control.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014