The ESTAE macro provides recovery capability facilities. Issuing the ESTAE macro allows the caller to intercept errors. Control is given to a caller-specified exit routine (called a recovery routine) in which the caller can perform various tasks, including diagnosing the cause of the error and specifying a retry address to avoid abnormal ending.
ESTAE type considerations: The type of ESTAE routine, that is, ESTAE or ESTAEX affects the AMODE of the recovery routine as follows. For recovery routines defined through the:
Depending on whether you code ESTAE or ESTAEX, the system passes the address of the user-specified parameter list differently. The SDWAPARM field in the SDWA contains either the address of the parameter list (ESTAE), or the address of a doubleword that contains the address and ALET of the parameter list (ESTAEX). When you run in AMODE 64 (as indicated by specifying AMODE64=YES through the SYSSTATE macro) and invoke ESTAEX, your ESTAEX routine will get control in AMODE 64. The 8-byte area pointed to by the SDWAPARM field will be the 8-byte address of the parameter area.
See the information on providing recovery in z/OS MVS Programming: Authorized Assembler Services Guide for information about writing recovery routines.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key. To use the CANCEL,
BRANCH, KEY, TOKEN, or SPIEOVERRIDE parameters, one of the
following:
|
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Must be in the primary address space |
If the program is in AR mode, you must use ESTAEX rather than ESTAE; issue the SYSSTATE macro with the ASCENV=AR parameter before you issue ESTAEX. SYSSTATE ASCENV=AR tells the system to generate code appropriate for AR mode.
For Branch-entry, IBM recommends that you have no EUT FRRs.
IBM recommends that you do not use the ESTAE or ESTAEX macro to deactivate and no longer define a FESTAE recovery routine that was defined and activated by a FESTAE macro.
Before issuing the ESTAE macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The standard form of the ESTAE macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede ESTAE. |
ESTAE | |
␢ | One or more blanks must follow ESTAE. |
exit addr | exit addr: A-type address, or register (2) - (12). |
0 | |
,CT | Default: CT |
,OV | |
,PARAM=list addr | list addr: A-type address, or register (2) - (12). |
,XCTL=NO | Default: XCTL=NO |
,XCTL=YES | |
,PURGE=NONE | Default: PURGE=NONE |
,PURGE=QUIESCE | |
,PURGE=HALT | |
,ASYNCH=YES | Default: ASYNCH=YES |
,ASYNCH=NO | |
,CANCEL=YES | Default: CANCEL=YES |
,CANCEL=NO | |
,TERM=NO | Default: TERM=NO |
,TERM=YES | |
,BRANCH=NO | Default: BRANCH=NO |
,BRANCH=YES,SVEAREA=save | save addr: A-type address, or register (2) - (12) or (13). |
addr | |
,KEY=SAVE | storage key: Any numeral in the range 0-15. |
,KEY=storage key | |
,RECORD=NO | Default: RECORD=NO |
,RECORD=YES | |
,TOKEN=token addr | token addr: A-type address, or register (2) - (12). |
,RELATED=value | value: Any valid macro keyword specification. |
,SDWALOC31=NO | Default: SDWALOC31=NO |
,SDWALOC31=YES | |
,SPIEOVERRIDE=NO | Default: SPIEOVERRIDE=NO |
,SPIEOVERRIDE=YES | |
The parameters are explained as follows.
The ESTAEX exit always gets control in 31-bit mode, regardless of the mode in which the macro was invoked.
For PURGE=QUIESCE and PURGE=HALT, RTM requests that all I/O be purged at the task level for the current task. Be aware that the purge request involves all I/O started by the task, not just the I/O started by the program that created this recovery routine. PURGE=QUIESCE must thus be used carefully, as it may wait for I/O that was not started by the program that created this recovery routine. Likewise, PURGE=HALT must be used carefully as it may terminate I/O that was not started by the program that created this recovery routine.
PURGE=NONE specifies that all control blocks affected by input/output processing can continue to change during ESTAE routine processing. If you specify PURGE=NONE and the error was an error in input/output processing, recursion develops when an input/output interruption occurs, even if the ESTAE routine is in progress. Thus, it will appear that the ESTAE routine failed when, in reality, input/output processing caused the failure.
To allow a recovery routine to be interrupted, specify CANCEL=YES.
When the ESTAE routine is entered because of one of the preceding reasons, retry is not permitted. If a dump is requested at the time the ABEND macro is issued, it is taken before entry into the ESTAE routine.
In these cases, entry to the routine occurs before dumping and retry is not permitted.
BRANCH and SVEAREA are not valid on ESTAEX.
If the user specifies KEY=SAVE, the macro saves the current PSW protection key in register 2 and issues a set protection key instruction (SPKA) to change to protection key zero. When the ESTAE service routine returns control, it restores the original PSW key from register 2. Therefore, the user should save register 2 before the macro expansion and restore it afterwards. Specifying KEY=SAVE destroys the contents of register 2 during the macro expansion.
On the other hand, if the user knows the current PSW protection key, he may specify it directly in the form KEY=(0-15) to eliminate saving and restoring the original protection key. This procedure eliminates an IPK instruction and prevents the use of register 2 in the macro expansion.
KEY is not valid on ESTAEX. KEY is optional and valid only with BRANCH=YES,SVEAREA=save addr.
If you specify RECORD=NO, the system does not record the SDWA in SYS1.LOGREC, unless the recovery routine indicates otherwise by issuing the SETRP macro with RECORD=YES.
With CT: ESTAE processing places the token created for this request in the location specified by token addr as well as in the ESTAE parameter list.
With OV: ESTAE processing locates the specified ESTAE routine for the current RB and replaces the routine information. If there are any newer ESTAE routines for the RB, they are deactivated and no longer defined.
With a recovery routine address of 0: ESTAE processing locates the specified ESTAE routine for the current RB and deactivates the routine. The routine is no longer defined. Any newer ESTAE routines for the RB are deactivated and no longer defined.
While the recovery routine that requests this parameter is established, no SPIE or ESPIE exit can receive control.
You can use this parameter to ensure that the ESTAEX recovery exit receives control for all program exceptions that occur while running in Problem state.
The SPIEOVERRIDE parameter is not required for programs that run in Supervisor state, run in cross-memory, or hold any lock, because SPIE and ESPIE exits are not eligible to receive control in these environments.
SPIEOVERRIDE is not valid on ESTAE.
The default value is SPIEOVERRIDE=NO.
None.
When control returns to the instruction following the ESTAE macro, GPR 15 contains one of the following return codes and GPR 0 contains one of the following reason codes.
Hexadecimal Return Code | Hexadecimal Reason Code | Meaning and Action |
---|---|---|
00 | None | Meaning: Successful completion of the ESTAE
request. Action: None. |
04 | 00 | Meaning: Program error. ESTAE OV was specified but ESTAE CT was performed. No valid ESTAE recovery routine existed. |
04 | 04 | Meaning: Program error. ESTAE OV was specified
but ESTAE CT was performed. The last ESTAE recovery routine
was not owned by the user's RB. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
04 | 08 | Meaning: Program error. ESTAE OV was specified
but ESTAE CT was performed. The last ESTAE recovery routine
was not created at the current linkage stack level. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
04 | 0C | Meaning: Program error. ESTAE OV was specified
but ESTAE CT was performed. The last recovery routine was
not an ESTAE recovery routine. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
0C | None | Meaning: Program error. A recovery routine
address equal to zero was specified, and either
Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
10 | None | Meaning: System error. An unexpected error
was encountered while this request was being processed. Action: Rerun your program one or more times. If the problem persists, record the return and reason codes and supply them to the appropriate IBM support personnel. |
14 | None | Meaning: Environmental error. ESTAE was
unable to obtain storage for a system data area. Action: Free some storage and reissue the ESTAE macro. |
18 | None | Meaning: Program error. ESTAE OV request
was invalid for one of the following reasons:
Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
1C | None | Meaning: Program error. ESTAE was unable
to access the input parameter list. Action: Make sure the parameter list is in the primary address space and reissue the ESTAE macro. |
20 | None | Meaning: Program error. XCTL=YES was rejected
because the linkage stack was not at the same level as it was when
the RB was created. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
24 | None | Meaning: Program error. A recovery routine
address equal to zero was specified, but it was rejected because no
ESTAE recovery routines were active for the current linkage stack
level. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
28 | None | Meaning: Program error. ESTAE OV was specified,
but it was rejected because no ESTAE recovery routines were active
for the current linkage stack level. Action: Correct the environment and either reissue the ESTAE macro or rerun your program, as appropriate. |
30 | None | Meaning: Program error. Branch-entered
ESTAE CT was specified, but it was rejected because
the caller has a cross-memory environment. Action: Use ESTAEX for programs that run in a cross-memory environment. |
ESTAE (4),ASYNCH=YES,TERM=NO,BRANCH=NO
ESTAE (4),PARAM=(2),TOKEN=TOKENFLD
ESTAE ADDR,ASYNCH=YES,PURGE=HALT,TERM=YES,BRANCH=YES, X
SVEAREA=SADDR,MF=(E,EXEC)
ESTAE ADDR,OV,PARAM=PLIST,XCTL=YES,PURGE=HALT,ASYNCH=NO
ESTAE (EXITPTR),PARAM=(9),MF=(E,(8))