Choosing an FRR

A supervisor state and PSW key 0-7 program must choose an FRR, as opposed to an ESTAE-type recovery routine, if the program is disabled, locked, or in SRB mode. To both define and activate the FRR, the program issues the SETFRR macro.

Note: Supervisor state and PSW key 0-7 programs can be protected by FRRs, but the program must be in supervisor state and PSW key 0 when it issues the SETFRR macro.

A supervisor state and PSW key 0-7 program can also choose an FRR if it is enabled, unlocked, and in task mode, by specifying EUT=YES on SETFRR. An FRR defined in this way is called an EUT FRR. A program might choose an EUT FRR if the circumstances under which the program will get control are unknown. If you do not know if the program will get control in task or SRB mode, whether it will be disabled, or whether it will be holding a lock, you can use an EUT FRR.

Once a program activates an EUT FRR, the program cannot issue any SVCs, and cannot handle asynchronous interrupts (the system does not dispatch any new asynchronous exits on that task until all FRRs for the task have been deactivated.)

An FRR is activated until one of the following events occurs:
  • You deactivate it and request that it be no longer defined (issue SETFRR D)
  • The FRR fails to or chooses not to retry (explained under Understanding recovery routine options)
  • The unit of work (either task or SRB) under which the caller of SETFRR is running terminates.
From the time an FRR is activated until the time it is deactivated, at least one of the following must be true:
  • The unit of work holds a lock
  • The unit of work is running disabled
  • The unit of work is an SRB
  • The FRR is an EUT FRR.

If at any time none of the above conditions are met, then the results are unpredictable, and your program might lose its FRR recovery. Note also that any FRR entered disabled must remain disabled.