Putting your system in a restricted state

Many recovery procedures require that your system have no other activity on it. When no subsystems except the controlling subsystem are active on your system, it is in a restricted state.

Use the End Subsystem (ENDSBS) command to put your system in a restricted state. You can specify how you want the subsystems to end.

Table 1. Possible values for the OPTION parameter of the ENDSBS command
Value Description
*CNTRLD Allow active jobs to end themselves (if they are checking to see if the job is being ended). If you specify *CNTRLD, you can use the delay parameter to set a time for the system to wait before ending subsystems immediately.
*IMMED End the subsystem immediately. Use this option if there are no users on the system and no batch jobs running.
Note: Even if you have no activity on the system, jobs might be running under a few system-provided subsystems, such as the QSYSWRK (subsystem monitor) subsystem and the QCALSRV (calendar server) subsystem. You can end all subsystems immediately without first ending these jobs. You will receive messages that these subsystems ended abnormally.

To put your system in a restricted state, follow these steps:

  1. Before putting your system in a restricted state, ensure that all users are signed off and all jobs are ended.
  2. To receive notification that the subsystems have ended, type the following command and press the Enter key:
    
    CHGMSGQ MSGQ(QSYSOPR) DLVRY(*BREAK)
            SEV(60)
  3. To end all subsystems, type the following command:
    
    ENDSBS SBS(*ALL) OPTION(*CNTRLD)
           DELAY(600)
    Note: For the delay parameter, specify a number of seconds that allows your system time to bring most jobs to a normal end. On a large busy system, you might need a longer delay.

A message is sent that indicates that the procedure for ending subsystems is in progress. A final message is sent when the system is in a restricted state.