Using the SETRP macro to update the SDWA
- Indicate retry or percolate
Use the RC parameter on SETRP to let the system know whether the recovery routine wants to percolate (RC=0) or retry (RC=4). If attempting a retry, the routine must also specify a retry address on the RETADDR parameter.
For ESTAI routines, you can also specify RC=16 to ask the system not to give control to any further ESTAI routines.
- Specify register contents for the retry routine
and free the SDWA
ESTAE-type recovery routines can use parameters on the SETRP macro to restore registers from the SDWA (RETREGS=YES), and to free the SDWA before control is given to the retry routine (FRESDWA=YES). See Retry from an ESTAE-type recovery routine for information about using the RETREGS and FRESDWA parameters.
For FRRs, RETREGS=YES or RETREGS=NO has no effect; the system always restores registers from the SDWA. FRRs cannot specify the FRESDWA parameter; the system always frees the SDWA before giving control to the retry routine.
- Save serviceability data
Use the RECPARM parameter to supply the load module name, the active CSECT name, and the recovery routine CSECT name.
- Change the completion and reason codes
You can specify both completion and reason code values on the ABEND macro. The system passes these values to recovery routines in the SDWA. Recovery routines can change the values of the completion code and the reason code by using the SETRP macro. The COMPCOD parameter allows you to specify a new completion code; the REASON parameter allows you to specify a new reason code.
The reason code has no meaning by itself, but must be used together with a completion code. To maintain meaningful completion and reason codes, the system propagates changes to these values according to the following rules:- If a user changes both the completion code and the reason code, the system accepts both new values.
- If a user changes the reason code but not the completion code, the system accepts the new reason code and uses the unchanged completion code.
- If a user changes the completion code but not the reason code, the system accepts the new completion code and uses a zero for the reason code.