Placing the system in restricted state

If all of the subsystems, including the controlling subsystem are ended, the system goes into a restricted condition. You can place the system in a restricted condition by using one of two commands from an interactive workstation.

Command: End Subsystem with the *ALL parameter (ENDSBS SBS(*ALL))

Command: End System (ENDSYS)

Important: The ENDSBS or ENDSYS command should be issued from an interactive job in the controlling subsystem, and only from a workstation whose entry in the controlling subsystem description specifies AT(*SIGNON). The interactive job from which the command was issued remains active when the controlling subsystem goes into a restricted condition. If more than one job is active at the workstation where the command is issued, such as a suspended system request job, suspended group job, or disconnected job, the suspended or disconnected jobs will prevent the controlling subsystem from reaching restricted state.

Use the Work with Active Jobs (WRKACTJOB) command and press F14=Include to display any suspended or disconnected jobs. If these jobs exist, you need to end them in order for the system to reach the restricted state.

When the system is in the restricted condition, most of the activity on the system has ended, and only one workstation is active. The system must be in this condition for commands such as Save System (SAVSYS) or Reclaim Storage (RCLSTG) to run. Some programs for diagnosing equipment problems also require the system to be in a restricted condition.

To end restricted state, use the Start Subsystem (STRSBS) command to start the controlling subsystem.

Restricted state status

There are several ways to determine whether the system is in the restricted state or not.

If you are working from an interactive session, use the Work with Subsystems (WRKSBS) command to determine when the system has reached the restricted state. When the controlling subsystem is the only subsystem still in the list and its status is RSTD (restricted), the system has reached the restricted state. The status of the subsystem is shown on the second view of the Work with Subsystems display, which can be seen by pressing the F11=Display system data key.

Another way to determine when the system has reached the restricted state is to look for the message CPF0968 in the QSYSOPR message queue. Specify *SYSOPR as the message queue on the Display Messages (DSPMSG) command to display the messages in the QSYSOPR message queue.

The Retrieve System Status (QWCRSSTS) API can be used to programmatically determine if the system is in the restricted state. The SSTS0200 format returns a CHAR(1) restricted state flag that indicates the current state of the system.