The SJF environment

The SJF environment consists of a work area and an ESTAE-type recovery routine. Applications can request that SJFREQ reuse the environment for multiple calls of the same service.

When multiple calls are required to complete the VERIFY function, an application must request that the environment be reused. To request SJFREQ to reuse the environment, the application must use the same value in SJVESTOR field of the VERIFY parameter list (IEFSJVEP) that was returned on the previous call.

Because an SJF environment can be reused over many calls, the application must indicate on the last SJFREQ call that the environment should be freed, or the application can issue SJFREQ TERMINATE to free the environment.

The system establishes an ESTAE-type recovery routine to release the work area in the event of an abnormal termination. The recovery routine is in effect for the duration of the SJF call. If an application reuses the work area, the recovery routine for the work area is still in effect even after the system returns control to the application.

When the application reuses the SJF environment, the SJF recovery routine protects the environment on behalf of the application. The SJF recovery routine gets control under the following conditions:
  • If an abnormal termination occurs while the application is processing and while SJF's environment still exists, then:
    • Abnormal termination continues
    • The application cannot reuse the environment that was referenced by SJVESTOR on input for the call that abnormally terminated.
  • If the abnormal termination occurs while SJF is processing and the SJF environment still exists, the application:
    • Receives a hexadecimal return code 14 from the SJFREQ macro, indicating an abnormal termination occurred
    • Cannot reuse the environment that was referenced by SJVESTOR on input for the call that abnormally terminated.