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


LERAD exit routine

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

A LERAD exit routine is identified in an ACB exit list when the application program wants a routine to be automatically invoked when a logic error (in contrast to a physical error) is detected.

Generally, a logic error results when an RPL-based request is made that is inherently contradictory, for example, when attempting to use an CID that is not valid. The SYNAD exit routine handles physical errors (such as hardware malfunctions). The LERAD exit routine, if specified, is entered for recovery action return codes of 20 and 24 (decimal). Handling errors and special conditions, discusses the use and logic of LERAD exit routines in detail.

When the LERAD exit routine returns control to VTAM®, VTAM leaves registers 0 and 15 intact so that the routine can pass information in these registers back to the part of the application program from which LERAD is invoked.

VTAM returns control to the next sequential instruction in the application program following the RPL-based request. Because the routine is executed under the same system scheduling control block as the part of the program that issues the RPL-based or CHECK macroinstruction, LERAD can branch to other parts of the program. If LERAD is entered from an RPL-based request or if the CHECK is issued in an asynchronous exit routine, the program must eventually branch to register 14. If the routine returns control to the next sequential instruction by branching to the register 14 address, VTAM restores the register from the save area whose address is in register 13.

If the exit routine is running under an SRB, different conditions apply for return. See Execution of exit routines.

Table 1. LERAD exit routine: Registers upon entry
Reg Contents
0 Recovery action return code (refer to Handling errors and special conditions).
1 Address of RPL associated with the request. The values in register 0 and register 1 are related in the following ways:
  • If register 0 is set to 24 (decimal), VTAM cannot place a value in the FDB2 field to specify the reason for the error. This occurs for one of the following reasons:
    • Issued macroinstruction's RPL is in use.
    • CHECK is issued for a request whose RPL exit routine has not yet been scheduled.
    • RPL that is not valid is specified.

    If the CHECK or RPL-based macroinstruction that caused entry into LERAD exit routine used one of the registers 2–12 inclusively, bit 0 of that register is returned in bit 0 of register 1. You can use this to detect recursive entries of LERAD.

2-12 Unmodified
13 Address of an 18-word save area supplied by the programmer when the macroinstruction that causes the logic error is issued. Be aware of the following:
  • If the exit routine returns control through register 14, it must not change anything in the save area. If any macroinstruction is issued in the exit routine, register 13 must first be loaded with the address of a new save area.
  • Before control is returned through register 14, register 13 must be restored with the value it has when the exit routine is invoked.
14 VTAM address that is branched to when LERAD exit routine completes processing
15 Address of LERAD exit routine

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014