Recovery routines that retry

When a recovery routine decides to retry, it should do the following:
  • Eliminate or minimize the cause of the error with complete or partial repair, as explained above under Correcting or minimizing the error.
  • Ensure that the retry routine's environment is restored. For example, restore registers and re-establish addressability to mainline resources. See Register contents on entry to a retry routine for details about how a recovery routine can control the register contents on entry to the retry routine.
  • Know the condition of resources being held by the mainline. For example, the recovery routine might have to acquire locks to repair data structures, back out changes to data sets, and so on.
  • For FRRs, decide what to do about locks that were acquired by the mainline and are held on entry to the FRR. In general, the FRR's responsibility is to make sure that all locks are freed, either by itself, or by the system. See Special considerations for FRRs for details about freeing locks held on entry to an FRR. ESTAE-type recovery routines are not entered holding any locks.
  • If the recovery routine obtains any locks after it gets control, it should free them before returning control to the system. If an FRR returns to the system holding locks the FRR obtained, the system frees them. An ESTAE-type recovery routine must free any locks it obtains before returning control to the system or an error occurs.
  • Indicate to the system that a retry is to be attempted. If an SDWA is present, the recovery routine issues the SETRP macro with the RC=4 parameter to indicate retry, and the RETADDR parameter to specify the address of the retry routine. You can specify RC=4 even when the SDWACLUP bit is on, indicating that retry is not allowed. If you do so, however, the system ignores the retry request.

    If no SDWA is present, the recovery routine has to set a return code of 4 in GPR 15, and place the address of the retry routine in GPR 0.

  • For an ESTAE-type recovery routine, decide whether to pass the SDWA to the retry routine, and so indicate on the SETRP macro with the FRESDWA parameter.