Understanding what recovery routines do

The following is a list of some of the things a recovery routine should do if the recovery is to be effective.

The items are arranged in a way that suggests the order in which you might do them; however, you must decide yourself the order that would work best for your particular routine.
  • Preserve the return address to the system.
  • Check for the presence of an SDWA (for ESTAE-type recovery routines only).
  • Establish addressability to the parameter area passed by the mainline routine. How you do that depends on whether an SDWA is present.
  • Check the contents of important fields in the SDWA.
    • Determine the location of the parameter area.
    • Determine why the routine was entered.
    • Determine if this is the first recovery routine to get control.
  • Check the contents of the parameter area passed by the mainline.
    • Determine if this is a repeated error (to avoid recursion).
    • Determine when and where the error occurred.
  • Provide information to help determine the cause of the error:
    • Save serviceability data in the SDWA.
    • Request recording in the logrec data set.
    • Request a dump of storage.
  • Try to correct or minimize the effects of the error.
  • Determine whether the recovery routine can retry, decide whether to retry or percolate, and take the appropriate actions (such as cleaning up resources).