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


LOSTERM exit routine

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

VTAM® can schedule a LOSTERM exit routine when a session with an application program is terminated or potentially disrupted, or when a conditional terminate request for a session is received. Alternatively, for some of these conditions, an SCIP exit routine is scheduled with UNBIND, or an NSEXIT exit routine is scheduled with CLEANUP. See Session outage notification for details. The application program might issue CLSDST to end the session. (If the application program fails to issue CLSDST, the LU with which the application program is, or was, in session might be unavailable for a session with any other application program. This occurs if the LU is at its session limit as a result of this session.)

If a session outage occurs, VTAM posts any outstanding requests associated with the affected session with an appropriate return code. If there are no outstanding requests, whenever the program makes the next request, it is posted with an appropriate return code.

A LOSTERM exit routine is especially recommended for an application program that does not issue specific-mode communication requests for its sessions, but is driven instead by input arriving as the result of RECEIVE macroinstructions issued in any-mode. Use of the exit routine is also recommended for an application program when there is the possibility that the LU can fill VTAM's buffers (obtained from application program storage) faster than the application program is emptying them with RECEIVE macroinstructions.

An example of a coded LOSTERM exit routine is shown in Sample code of a simple application program.

Table 1. LOSTERM exit routine: Registers upon entry
Reg Contents
0, 2-13 Unpredictable
1 Address of a parameter list that includes the following:
  • Word 1—address of ACB of application program whose session has been affected
  • Word 2—address of RPL if reason code 44; for all other reason codes, CID of the session
  • Word 3—reserved if reason code 44; for all other reason codes, USERFLD data from NIB that is used to establish the session
  • Word 4—reason code value indicating why LOSTERM is entered (unless indicated otherwise, the reason code is reported only to the PLU application)
  • Words 5, 6—reserved
14 VTAM address that is branched to when LOSTERM exit routine completes processing
15 Address of LOSTERM exit routine

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014