Stopping and restarting a subtask (STATUS macro)

To stop a subtask means to change its dispatchability status from ready to not ready. You might need to stop a subtask that is currently ready or running, and then to restart, or make ready, that subtask. Stopping a subtask is a programming technique to control the dispatchability of other related tasks or subtasks in a multi-tasking environment when the tasks are in problem state.

To stop all subtasks of an originating task, issue the STATUS macro with the STOP parameter. To stop a specific subtask, issue the STATUS macro with the STOP,TCB parameter, which identifies a specific subtask.

To restart the stopped subtask or subtasks, issue STATUS START. As with STATUS STOP, use the TCB parameter to restart a specific subtask.