CL Command Reference - ENDSYS
CL Command List > ENDSYS Reference
Description:
The End System (ENDSYS) command ends most activity on the system and leaves the system in a condition in which only the console is active in the controlling subsystem. This is done so that the operator can do things like backing up the system or loading new programs. This condition is called the restricted state and is required for operations like saving the system or reclaiming storage. If two jobs are active in the controlling subsystem at the console, neither of the jobs is forced to end. The ENDSYS command cannot complete running until you end one of the jobs (either by signing off in one job or by ending one job from the other).
All active subsystems are notified that an end system operation is in process. No new jobs or routing steps can be accepted by the subsystems. This command also specifies what happens to all active work.
Interactive jobs that are transferred to a job queue by the Transfer Job (TFRJOB) command are ended as part of subsystem ending. If an initial program load (IPL) occurs while either a batch or interactive job is on a job queue (because of the TFRJOB command), that job is removed from the job queue during IPL and its job log is produced.
Restriction: This command can be entered only in an interactive job in the controlling subsystem. To use this command, the user must have job control (*JOBCTL) authority. This command is not allowed in a pass-through job or in a workstation function job.
Examples:
Example 1: Ending System Activity
ENDSYS
This command ends the system activity after all active jobs in the system are allowed to perform their own end of processes. The amount of time the end can take is not limited.
Example 2: Ending System Activity After Jobs are Ended
ENDSYS OPTION(*IMMED)
This command ends system activity after all active jobs are immediately ended.