The recovery routines you can provide are called ESTAE-type recovery routines. This information describes the different types of ESTAE-type recovery routines, and for each type, describes how you define it, activate it, deactivate it, and request that it no longer be defined. A summary of this information is in Table 1.
When you provide one or more recovery routines for your program, you have the opportunity to identify a user parameter area for the system to pass from the mainline routine to the recovery routine. Creating such a parameter area with information for the recovery routine is a very important part of providing recovery. See Setting up, passing, and accessing the parameter area for more information about what this parameter area should contain, and how to pass it.
A program cannot protect other tasks with recovery routines defined through these macros.
IBM® recommends you always use ESTAEX unless your program and your recovery routine are in 24-bit addressing mode, in which case, you should use ESTAE. ESTAE and ESTAEX provide the same function, except that ESTAEX can be issued in AR ASC mode.
The remainder of this chapter refers to the recovery routines you define and activate through the ESTAE and ESTAEX macros as ESTAE routines or ESTAEX routines, respectively.
To attach a task and provide recovery to protect the attached task and all of its subtasks, a program can issue either the ATTACH or the ATTACHX macro with either the STAI or the ESTAI parameter. You define the recovery routine when you issue the macro. The recovery routine is not activated until the attached task gets control. The recovery routine remains activated as long as the attached task is still running, or until the recovery routine fails to or chooses not to retry. The system deactivates the recovery routine when the attached task ends. At that point, the recovery routine is no longer defined.
The program attaching the task is not protected by the recovery defined in this manner. Only the attached task and its subtasks are protected.
IBM recommends you always use the ESTAI, rather than the STAI, parameter on ATTACHX, rather than ATTACH. ATTACH and ATTACHX provide the same function, except that ATTACHX can be issued in AR ASC mode.
The remainder of this chapter refers to the recovery routines you define through ATTACHX with ESTAI as ESTAI routines. All references to the ATTACHX macro apply also to the ATTACH macro.
Use the IEAARR macro to define and activate an associated recovery routine (ARR) to protect the currently running program and any programs it calls running under the same task. ARRs provide recovery for stacking PC routines.
In summary, ESTAE-type recovery routines include ESTAE and ESTAEX routines, ESTAI routines and ARRs.