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


TPEND exit routine is entered

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

The TPEND exit routine is entered when the VTAM® operator deactivates the application program or issues a HALT command or when, because of an internal error or problem, VTAM stops or abnormally ends.

In addition, for SNPS processing, VTAM schedules the TPEND exit in response to an OPEN ACB from an alternate application that wants to take over sessions from an application that has enabled the persistent LU-LU session support. The TPEND exit routine may also be scheduled if an active application program with the same 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.

VTAM might also drive the TPEND exit upon receipt of an MNPS forced takeover request from another node in the sysplex. The requested CLOSE ACB in this situation is treated as a persistent CLOSE ACB, allowing this VTAM to create a stable image of the application session and underlying HPR pipe data for the recovering node to use for rebuilding the sessions and pipes remotely.

VTAM can schedule the TPEND exit in response to three kinds of HALT commands:
  • A standard HALT command, which contains neither the QUICK nor the CANCEL operand
  • A HALT NET,QUICK command, which initiates a quick closedown
  • A HALT NET,CANCEL command, which initiates a cancel closedown.

A VTAM operator can choose to simultaneously end all application programs running under VTAM. To do this, the operator issues a standard HALT command or a HALT NET,QUICK command. Neither command, however, is completed (that is, VTAM is not halted) until all application programs have closed their ACBs. The following sections describe the specific actions taken by the TPEND exit routine in response to the different HALT commands.

When the TPEND exit routine is entered, register 1 contains the address of a 2-word parameter list in which:
  • Word 1 of this parameter list contains the address of the ACB of the application program being shut down.
  • Word 2 contains one of the following codes that indicates the reason for entry to the exit routine:
     0
    The VTAM operator issued a standard HALT command.
     4
    The VTAM operator deactivated the application program or issued a HALT NET,QUICK command, or VTAM is halting itself in an orderly fashion because of an internal problem.
     8
    The VTAM operator issued a HALT NET,CANCEL command, or VTAM is being abnormally terminated.
    12
    An alternate application has issued an OPEN ACB for the same application network name that this application has opened. The new application image is either located on this VTAM, or is on a different VTAM in the sysplex and has notified this VTAM of the request using an MNPS forced takeover signal. Because the alternate application has taken over, the original application must issue CLOSE ACB.

    See TPEND exit routine for complete descriptions of the reason codes that may be present in word 2 of the parameter list.

For codes 0 and 4, the TPEND exit routine should take action as indicated in the following sections. For codes 8 and 12, the exit routine should immediately return control to the mainline program, where a CLOSE macroinstruction should be issued.

If an application program does not have a TPEND exit routine or if that exit routine cannot be scheduled, the application program is abnormally terminated.

For more information on the TPEND exit routine, see its description in Using exit routines.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014