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


TPEND exit routine

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

VTAM® invokes the TPEND exit routine when any of the following occurs:
  • VTAM operator issues a HALT command.
  • VTAM halts itself in an orderly fashion because of an internal problem.
  • VTAM terminates abnormally.
  • The operator issues a VARY INACT command for the application program.
  • VTAM schedules the TPEND exit in response to an OPEN ACB from an alternate application that wants to take over the sessions from the original application.
  • VTAM receives notification of a multinode persistent session (MNPS) forced takeover request for this application.
A reason code in the second word of the parameter list passed to the exit routine indicates the reason for entry to the exit routine.
Reason code
Meaning
0
indicates a standard HALT command (a HALT command without the QUICK or CANCEL operand). The program is allowed to continue communications on existing sessions or CMIP connections, but the program should end those communications in an orderly fashion as soon as it can. No new sessions can be established. For CMIP application programs, the MIBConnect function cannot be issued. The exit routine should have the mainline program issue a CLOSE macroinstruction or for CMIP application programs, call the MIBDisconnect function. (A CLOSE macroinstruction or for CMIP application programs, a MIBDisconnect function, cannot be issued in an exit routine.)
4
indicates a a HALT QUICK command, when VTAM is halting itself, or when the operator issues a VARY INACT command for the application program. The pending RPL-based operations are canceled. For reason code 4 (as for reason code 0), the application program should issue the CLOSE macroinstruction or for CMIP application programs, the MIBDisconnect function, in the mainline program.
8
indicates a HALT CANCEL command or VTAM abnormal termination. The pending operations are interrupted (without being marked as completed or canceled), and no VTAM macroinstruction except CLOSE is accepted. For CMIP application programs, only the MIBDisconnect function is accepted. The TPEND exit routine should return to the mainline program for immediate issuance of the CLOSE macroinstruction or for CMIP application progams, the MIBDisconnect function, without any attempt to issue other VTAM requests.
Note: The TPEND exit routine with reason code 8 can interrupt any other exit routine.
12
indicates that VTAM has scheduled the TPEND exit in response to an OPEN ACB from an alternate application that wants to take over the sessions from the original application. VTAM drives the TPEND exit and suspends the sessions. See Restoring sessions pending recovery for information on how to restore sessions following an application program failure and recovery.

This reason code also indicates that an active application program with the same network name has enabled persistence on another VTAM when this VTAM connects to the multinode persistent sessions coupling facility structure. Specifically, this occurs when a persistence-enabled application program is open and VTAM is not connected to the coupling facility. Later, when VTAM connects to the coupling facility, it detects an open application program with the same name that is already enabled for persistence. See Opening the ACB during recovery from a node failure for more information.

This reason code might also indicate that VTAM has scheduled the TPEND exit in response to an OPEN ACB from an alternate application on a different node in the sysplex that is requesting MNPS forced takeover processing. VTAM drives the TPEND exit to inform the application that VTAM is generating a CLOSE ACB for the application while the application is in persistence enabled state. This mechanism allows the sessions to be maintained long enough for the MNPS takeover to be performed by the other application instance.

Note: CMIP application programs do not receive this return code.

See TPEND exit routine is entered for more information on actions taken when the TPEND exit routine is invoked.

Table 1. TPEND 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 being shut down
  • Word 2—reason code for shutdown
  • Words 3-7—reserved.
14 VTAM address that is branched to when TPEND exit routine completes processing
15 Address of TPEND exit routine

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014