Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SHUTDOWN

&pagelevel(3)&pagelevel

Initiate session termination

Component:

BS2000

Functional area:

System control and optimization

Domain:

SYSTEM-MANAGEMENT

Privileges:

OPERATING

Routing code:

R

Function

The SHUTDOWN command prohibits new jobs or terminates all currently active jobs. The operator issues the SHUTDOWN command prior to physical shutdown of the system or prior to activating an automatic restart so that all system activities can be completed normally. System shutdown comprises two stages:

  1. Suspension of job acceptance in the system and notification of the interactive user.

  2. Immediate initialization of session termination (termination of all active jobs).

When system shutdown is completed, message EXC0557 is issued.

On shutdown with automatic restart (RESTART=*YES), timed restarts can be arranged with the DELAY suboperand.

Guest systems can also be shut down using the SHUTDOWN-VM command (see the “VM2000” manual [50]).

On the SE server the request to shut down the session can also be entered on the SE manager. For such a request, the system parameter SHUTPROC specifies whether a SHUTDOWN command is issued or an ENTER job is started.

Format

SHUTDOWN                                                                                                                                                   

MODE = *NO / *END(...) / *QUIET


*END(...)



|


RESTART = *NO / *YES(...)



|



*YES(...)



|




|


DELAY = *STD / <integer 0..32767 seconds>



|




|


,IPL-DEVICE = *NO / <alphanum-name 2..4>

,MESSAGE = *NO / <c-string 1..40>

Operands

MODE =
Defines how the system is to be terminated.

MODE = *NO
The default value *NO is equivalent to specifying MODE=*END(RESTART=*NO); in other words, all job are terminated immediately, and there is no automatic restart.

MODE = *END
The system immediately terminates all interactive and noninteractive jobs currently running.

RESTART = *NO / *YES(...)
Governs whether there is to be an automatic restart on completion of system shutdown. The default is *NO, i.e. no automatic restart.

RESTART = *YES(...)
An automatic restart will be initiated on completion of system shutdown.

DELAY = *STD / <integer 0..32767 seconds>
Defines a delay in seconds inserted between completion of system shutdown (output of message EXC0557) and initiation of automatic restart.
The default is *STD, which means that automatic restart is to be initiated immediately (equivalent to specifying 0 seconds).

IPL-DEVICE = *NO / <alphanum-name 2..4>
Specifies which IPL device to use for automatic restart.

IPL-DEVICE = *NO
Restart is to be performed with the same IPL device.

IPL-DEVICE = <alphanum-name 2..4>
Device mnemonic of a new IPL device (only disk accesses are permitted) to be used when the system is restarted.

MODE = *QUIET
The Control System is to prohibit the scheduling of additional jobs. The BCAM command /BCEND W=Y,TERM=N is simulated (see the “BCAM” manual [2]), and notification (message NRTK201) is sent to all interactive tasks.

MESSAGE =
Specifies whether a freely definable text is to be sent to all interactive tasks in addition to message NRTK201 (MODE = *QUIET) or a special text is to be processed internally in the system (MODE = *END).

MESSAGE = *NO
No message is to be sent.

MESSAGE = <c-string 1..40>
The message (max. 40 characters) to be sent.
The ‘*RESTART’ text can be processed in connection with MODE = *END. In this case the system is terminated with previous resource release.
With MODE = *QUIET the specified text is appended to message NRTK201 as an insert and sent to all interactive tasks. 

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error

2

0

EXC0745

SHUTDOWN with MODE=*QUIET already called

2

0

EXC0747

SHUTDOWN continue interrogation rejected by caller

2

0

NRT1204

SHUTDOWN with MODE=*END already called


64

NRT1206

Internal $HSVP error with GET-IPL-DEVICE


64

NRT1207

Specified IPL device does not exist


64

NRT1208

Internal $NKBINF error


1

EXC0746

Syntax error


64

CMD0216

Caller is not privileged


64

EXC0688

Automatic restart not possible because IPL disk does not belong to home pubset

2

64

NRT1205

SHUTDOWN with automatic restart and change of IPL device not supported


64

NRT1203

Dynamic I/O configuration change is active


64

NRT1210

IPL device is not a valid disk


64

NRT1211

IPL device is neither installed nor assigned (in VM2000)


64

NRT1212

IPL device is not assigned exclusively (in VM2000)


64

NRT1213

IPL device not accepted

Notes

  • The operator should always perform a normal shutdown to allow sufficient time for tasks to be terminated between SHUTDOWN MODE=*QUIET and SHUTDOWN MODE=*END.

  • At the start of SHUTDOWN-END processing a check is carried out to determine whether an archive save run is active. If so, the SHUTARCH system parameter is checked to see whether the operator should be asked if SHUTDOWN-END processing is to continue. If ‘SHUTARCH’ is set to ‘N’ (default value) the operator is not asked; if ‘Y’ is set the operator is presented with the following message:

    EXC074F ARCHIVE SAVE RUN ACTIVE. CONTINUE SHUTDOWN PROCESSING?
    REPLY (Y=YES; N=NO)

    The operator can abort system termination by entering ‘N’ when asked whether SHUTDOWN-END processing should continue. This is acknowledged with the following message:

    EXC0747 SHUTDOWN FUNCTION WITHDRAWN BY CALLER

  • For SHUTDOWN MODE=*END, the command BCEND is simulated. Nevertheless, you should call the BCEND call before the SHUTDOWN-END job to allow the user programs connected to the user programs time to terminate properly.

  • If a session is not properly shut down, the same accounting file must be loaded during the next system initialization in order to ensure that restoration takes place.

  • All tasks for which a HOLD-TASK command was given must be released by means of RESUME-TASK command before SHUTDOWN MODE=*END is entered; otherwise these tasks will not be properly terminated.

  • All pending system dumps should be completed prior to input of SHUTDOWN MODE=*END. System dumps requested during SHUTDOWN processing are rejected.

  • An attempt is made to terminate all existing user tasks via CANCEL-JOB calls. A FORCE-JOB-CANCEL call is issued to all user tasks which cannot be terminated via a simple CANCEL-JOB command. If there is at least one task which cannot be terminated either with CANCEL or with FORCE-JOB-CANCEL the following message is output after the (FORCE-)CANCEL cycle:

    EXC0716 ONE OR MORE TASKS PERMANENTLY PENDED. TAKE DUMP AFTER COMPLETION
    OF SHUTDOWN

    The system parameter SHUTCTL enables the maximum wait time in the (FORCE-)CANCEL cycle to be set to a value ranging from 30 seconds (SHUTCTL=0) to 60 minutes (SHUTCTL=60).

  • The SHUTDOWN-END job is normally acknowledged by the following message:

    EXC0557 SHUTDOWN PROCESSING COMPLETED

    If problems arise during SHUTDOWN-END processing, an appropriate warning, such as the above message EXC0716, is output instructing you to start a dump.
    At the end of SHUTDOWN-END processing the operator is presented with the following message:

    EXC0557 SHUTDOWN PROCESSING COMPLETED WITH PROBLEMS

    In this case you should make a memory dump using SLED.

  • If automatic restart has been activated, initiation of the shutdown job is acknowledged with the following message:

    SHUTDOWN WITH AUTOMATIC RESTART INITIATED

    Dependencies on the SET-RESTART-OPTIONS command arise only in conjunction with a crash (with a shutdown).

  • For a shutdown with RESTART=*NO, a SLED dump is produced only in conjunction with the restart option DUMP=*SLED (see SET-RESTART-OPTIONS command).

  • For a shutdown with RESTART=*YES, a SLED dump is produced both with the restart option DUMP=*SLED and if a dump is requested explicitly by the crash caller.