Exit routines
VTAM® allows use of exit routines by which a VTAM application program can gain control to handle certain conditions. An exit routine handles a specific event. When that event occurs, VTAM gives control to the exit routine as soon as possible.
Following are two kinds of application program exit routines:
- Exit-list (EXLST) exit routines
- These are special-purpose exit routines that VTAM schedules as needed. The exit list, created with the EXLST macroinstruction, specifies the exit-routine addresses (entry points). A program can have more than one exit list. An exit list can be specified in an ACB and thus be used by VTAM when an exit-routine event occurs for any session with the program. For certain exit routines—DFASY, RESP, and SCIP—an exit list can be specified in an NIB and can be used by VTAM only when an exit-routine event occurs for the session associated with the NIB. See Figure 2 and Figure 3 for more information.
- RPL-specified exit routines
- These are exit routines that contain instructions to be executed when particular RPL-based operations are completed. In any individual session-establishment, communication, or other RPL-based macroinstruction, if an RPL exit-routine address is specified, the exit routine is scheduled as an alternative to VTAM's posting an ECB when the requested action is completed. A program can use a mixture of ECB-posting and RPL exit routines, or it can use solely one or the other.
The names of the special-purpose exit routines and the events that schedule them are summarized in Table 1.
| Exit routine |
|
|---|---|
| ATTN | One of the following LU 6.2 events has occurred:
|
| DFASY | An expedited data-flow-control request has been received on a session. |
| LERAD | A logic error has been detected following an RPL-based request. |
| LOGON | An application program is being requested to establish a session as a PLU. |
| LOSTERM | A session with an LU has been temporarily interrupted or permanently lost; the LU or VTAM operator requested that the session be terminated; or an event occurred that can affect future operation of the session. |
| NSEXIT | A network services request unit has arrived for the application
program, indicating, for example, that:
|
| RELREQ | Another application program has requested a session with an LU that is presently in session with this program. |
| RESP | A response has been received. |
| SCIP | One of the following session-control requests has been received:
|
| SYNAD | An error other than a logic error has been detected for an RPL-based request. |
| TPEND | The VTAM operator is shutting down the network or shutting down this application, VTAM has abended, or an alternate application is taking over sessions from an application that has enabled persistence. |