Stop a subsystem

You can use iSeries™ Navigator or the character-based interface to stop one or more active subsystems and specify what happens to active work being processed. No new jobs or routing steps are started in the subsystem after the subsystem is stopped.

When a subsystem is stopped, you can specify what happens to active work that is being processed by the system. For example, you can specify for all jobs in the subsystem to be ended immediately (Immediate), or you can specify that jobs are allowed to finish processing before the subsystem ends (Controlled).
Important: It is recommended that subsystems be stopped using the Controlled option whenever possible. This allows active jobs to end themselves. Use this option to ensure that jobs finish before the subsystems end. This allows the programs that are running to perform cleanup (end-of-job processing). Specifying the Immediate value can cause undesirable results, such as data that has been partially updated.
There are two types of stops.
Controlled (Recommended)
Ends the subsystem in a controlled manner. The jobs are also ended in a controlled manner. This allows the programs that are running to perform cleanup (end of job processing). When a job being ended has a signal handling procedure for the asynchronous signal SIGTERM, the SIGTERM signal is generated for that job. The application has the amount of time specified for the DELAY parameter to complete cleanup before the job is ended.
Immediate
Ends the subsystem immediately. The jobs are also ended immediately. When a job being ended has a signal handling procedure for the asynchronous signal SIGTERM, the SIGTERM signal is generated for that job and the QENDJOBLMT system value specifies a time limit. Other than handling the SIGTERM signal, the programs that are running are not allowed to perform any cleanup.
Related concepts
End a job: controlled
Related tasks
How to display job logs
Related information
Jobs system values: Maximum time for immediate end

Character-based interface

To use the character-based interface, type in the following command:
Command: End Subsystem (ENDSBS )
Example: This command ends all active jobs in the QBATCH subsystem and ends the subsystem. The active jobs are allowed 60 seconds to perform application-provided end-of-job processing.
ENDSBS   SBS(QBATCH)  OPTION(*CNTRLD)  DELAY(60)
Use the End Subsystem Option (ENDSBSOPT) parameter to improve the performance for ending a subsystem. If you specify ENDSBSOPT(*NOJOBLOG), the subsystem will end, but a job log will not be produced for every job that was in the subsystem.

If a problem occurs in a job, but you specified *NOJOBLOG, problem diagnosis may be difficult or impossible because the problem is not recorded in the job log. If you used the LOGOUTPUT(*PND) job attribute then the job log is placed in a pending state, but is not written. However, the job log is still available if it is needed. See the related topics on job logs for more information about job log pending.

If you specify ENDSBSOPT(*CHGPTY *CHGTSL), the run priority and time slice will change for all jobs that end in this subsystem. The jobs will compete less aggressively for processor cycles and will end with less of an impact on jobs that are still running in other subsystems.

You can specify all three options (*NOJOBLOG, *CHGPTY, and *CHGTSL) on the ENDSBSOPT parameter, for example:
ENDSBSOPT(*NOJOBLOG *CHGPTY *CHGTSL)
Note: If you specify *ALL for the subsystem name and have any jobs running under QSYSWRK, you should use *CNTRLD to prevent a subsystem from ending abnormally.