Ensuring that a process completes (STATUS macro)

Complex programs, such as database managers, often include processes that use critical resources and that must complete quickly. While it is possible to prevent delays by running the program disabled, disabled programs have certain restrictions, such as not being able to perform I/O and not being able to reference pageable storage. If your program cannot run with the restrictions of a disabled program, and it cannot tolerate a process delay, issue the STATUS macro with the SET,MC,PROCESS parameter, taking into consideration the restrictions discussed later in this topic. Issuing STATUS SET,MC,PROCESS puts the program in process-must-complete mode.

Issuing STATUS SET,MC,PROCESS at the start of a process postpones delays from certain events. The macro allows a process using critical resources to complete but allows all other tasks in the address space to continue running. Examples of events that cause delays that the STATUS macro can postpone are: Process-must-complete mode also prevents the CANCEL command from stopping a program that is already running. Issuing STATUS SET,MC,PROCESS does not, however, postpone external interrupts or interrupts from I/O.
There are other restrictions to consider when deciding whether to place a process in process-must-complete mode. While in process-must-complete mode, a task cannot:

Remaining in process-must-complete mode for an extended period of time will degrade the performance of other programs waiting to use global resources that the program in this mode holds. Ensure that the process that issues STATUS SET,MC,PROCESS really must complete without delay, and that you end process-must-complete mode as soon as the program releases the resource.

To end process-must-compete mode, issue the STATUS macro with the RESET,MC,PROCESS parameter.

STATUS also stops started subtasks and restarts them as described in z/OS MVS Programming: Assembler Services Guide.