z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Providing an address space termination routine

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

You can provide a routine that receives control when the address space terminates for reasons other than the ASDES macro. Specify the address of the routine on the TRMEXIT parameter. The termination routine receives control in 31-bit addressing mode, supervisor state, and in the same key as the program that issued the ASCRE macro. The routine is an asynchronous exit that resides in the creating program's address space and runs under its TCB.

To identify the terminating address space to the termination routine and pass data, use the 64-bit area provided on the UTOKEN parameter. Specify the address of this data area on the UTOKEN parameter.

The UTOKEN parameter provides a 64-bit area in which the creating program can pass data to the termination routine. Use UTOKEN to:
  • Give the address space a unique name that the termination routine can use. If your program has created more than one address space, the UTOKEN parameter area can identify which address space is terminating.
  • Pass other data to the termination routine. Data might consist of the address and ALET of a workarea containing the name of the address space.
On entry to the routine:
  • Register 1 contains the address of a copy of the 64-bit data that the UTOKEN parameter supplies.
  • Register 13 contains the address of a standard 18-word save area.
  • Register 14 contains the return address.
  • Register 15 contains the entry point address.
The termination routine will not get control for either of the following two reasons:
  • The ASDES macro terminates the new address space.
  • The creating address space terminates before the new address space terminates.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014