Recovery

The use of callable services from SRB routines requires that the SRB and associated task mode routines must assume responsibility for certain recovery actions. Failure to provide for this can result in unwanted and unpredictable system problems; the system will take a dump. This responsibility revolves around the creation and termination of the process with which the SRB is associated. The process should be created (dubbed) prior to the scheduling of any SRBs that may be associated with it for the purpose of issuing calls. In addition, the SRBs must not be allowed to issue calls after the process has terminated, and the owner of the function taking advantage of SRB mode calls is responsible for guaranteeing that this does not happen. The function must also ensure that it cannot terminate until all of the application-created SRBs have completed processing.

Task and address space-level resource managers can be used to help meet this responsibility. You can use the MVS™ RESMGR service to set up task and address space resource managers. The following example shows the proper order of processing for the task mode routine, and for the task and address space dynamic resource manager.