Terminating address space jobs (z/OS®)
On z/OS®, because started jobs can remain present in the system waiting for work for up to the time limit that is specified by the ARSODF_JOBSLEEP parameter in the ARS.CFG file, you can use a utility to force these jobs to end.
About this task
Module ARSRASC9 is modified to accept an EXEC statement PARM string. This PARM string can be any of the following values:
- PURGE
- Requests the destruction of the environment and control block structure that was created by ARSRASCR. Use this function only in an emergency situation when it appears that the Address Space Create services are not succeeding and all other attempts at correcting the situation do not alleviate the problem. The PURGE function can cause ARSRASCR created address spaces that are running at the time of the Purge request is processed to ABEND, and CSA storage will be lost. However, this might allow the Address Space Create functions to run successfully after the PURGE function has completed.
- RESET
- Requests the resetting of the Address Space Create Suppression
control. This control is set by ARSRASCR when any target address space
ends without completing its application-level initialization. The
control is also set when ARSRASC9 is run with the FORCETERM parameter.
RESET is the default if no PARM text is supplied.
- FORCETERM
- Requests that all active address spaces that are created by ARSRASCR be terminated. This also resets the Address Space Create Suppression control. Therefore, any subsequent requests to create address spaces are rejected. Running ARSRASC9 with the RESET parameter resets this suppression state.
- QUIESCE
- Identical to FORCETERM in all respects with one exception. A FORCETERM operation will ABEND target address spaces that have not ended within the permissible maximum time period following the receipt of the termination request. A QUIESCE operation allows target address spaces to continue processing their current unit of work without any imposed time limit.
ARSRASC9, if invoked with the FORCETERM parameter, operates in the following way:
Procedure
- A WTOR is produced requesting confirmation of the FORCETERM function. If the confirmation is denied, no further action is taken.
- The "Mass Terminate" function of ARSRASCR is invoked, and a status message reflecting the processing performed by ARSRASCR is produced.
- Exit.
Results
The Mass Terminate function of ARSRASCR operates in the following order:
- The Address Space Create Suppression control is set to inhibit the creation of new address spaces.
- The New Work/Shutdown ECB for each target address space is posted with a POST code indicating this is a shutdown request. The code that is running in each of these address spaces should respond to this POST action as quickly as possible and proceed with orderly termination.
- ARSRASCR allows each target address space 60 seconds to terminate voluntarily. After this time period expires, any remaining address spaces are forcibly terminated through the z/OS CALLRTM interface. This style of termination is similar to the results of the z/OS CANCEL operator command; the address space is ABENDed with an indication that Recovery Routines are allowed to run but they might not schedule Retry Routines.
- ARSRASCR returns to the caller.