SHUTDOWN Policy Item

If you select the SHUTDOWN policy item from the Policy Selection panel for Applications, the Subsystem Shutdown Processing panel is displayed, as shown in Figure 1.

Figure 1. Subsystem Shutdown Processing Panel
   
   COMMANDS  HELP                                                               
 ------------------------------------------------------------------------------ 
                           Subsystem Shutdown Processing                        
 Command ===>                                                                                                                                              
                                                                                
 Entry Type : Application           PolicyDB Name   : USER_PDB           
 Entry Name : CANSM2RC              Enterprise Name : USER_ENTERPRISE           
                                                                                
 Shutdown Pass Interval. .         (hh:mm:ss)                               
                                                                                
 Line Commands: S/C (Cmd), R (Rep)                                       
                                                                                
 Cmd     Phase    Description                                  Cmd  Rep            
                                                                                
         INIT     Executed when shutdown is initiated                              
         NORM     Executed when normal shutdown is invoked       2                 
         IMMED    Executed when immediate shutdown is invoked    2                 
         FORCE    Executed when force shutdown is invoked        1                 
         FINAL    Executed after final termination message                         
                                                                                
                                                                                
                                                                                

The SHUTDOWN policy is used to specify the shutdown pass interval (which is also available on policy APPLICATION INFO) and all the commands necessary to shutdown a subsystem and follow-on activities.

Any commands or replies that have been inherited from linked classes for the different shutdown phases are shown in a different color in the Cmd and Rep columns.

You should bear in mind the following inheritance behavior for shutdown definitions:

  • Shutdown specifications are inherited per phase. For example, if you define a SHUTINIT command for an instance that has been linked to a class that has both SHUTINIT and SHUTNORM commands defined for it, the instance inherits only the SHUTNORM commands from the class.
  • Command and reply definitions for each phase are inherited together. For example, if you define a command for the SHUTFORCE phase for an instance that is linked to a class that has a reply defined for SHUTFORCE, nothing is inherited by that instance.
  • If you modify any inherited data, that definition becomes one for the current application. For example, if command and reply definitions are inherited for a phase and you then modify the commands, both the reply and command definitions become data for the current application. This is also the case if an instance inherits only command definitions for a phase and you then define a reply for that phase.

You can find out which class a value has been inherited from by typing the command classname (or its abbreviation cn) on the command line, moving the cursor to the field of interest and pressing Enter.

Because shutdown procedures may involve replies to outstanding messages as well as commands, the Cmd field is used to indicate whether a command or reply is to be specified for a particular shutdown phase. If you enter either CMD or REP, you go to another panel where the actual commands and replies can be defined.

Shutdown Pass Interval
Specifies how long SA z/OS waits for attempts to shutdown the subsystem. These attempts are defined in the following shutdown phases.

If the field is left blank the value can be inherited from a class or the application defaults definition. If nothing specified nor inherited the automation agent supplied default is 2 minutes.

Similar to the startup processing of applications described in the previous section, the following commands or replies can be chosen from this panel:

INIT
Commands and replies that you enter for this phase are issued when the shutdown process is initiated (that is, before the subsystem is brought down). Possible entries could be commands to send out warning messages to users or quiescing activities.

If you specified a PREPUNAVAILABLE relationship, the commands listed under INIT will be executed if the condition is satisfied.

Initial shutdown commands do any necessary processing for an application when shutdown begins, for example:

  • You can use initial shutdown commands to issue a warning to any logged-on users that the application is shutting down.
  • For the JES2 subsystem, you may wish to stop users on JES2 NJE lines from starting new transmissions or sessions.
Note: You should not use the initial shutdown commands to actually shut down the application because unpredictable results may occur.
NORM
If the NORM option is selected for the INGREQ STOP command, all the commands and replies that are entered for this phase are issued. These entries should be the commands and replies that perform a normal shutdown of the subsystem.
IMMED
The commands and replies specified here are run if the IMMED option for INGREQ STOP is selected. These entries bring the subsystem down immediately.
FORCE
The entries specified here are run if the FORCE option for INGREQ STOP is selected. The commands and replies would be the typical ones a user would enter to force a subsystem off the system without any delay.
FINAL
The commands specified here are run after the final termination message has been received. Note that shutdown reply processing is not allowed for FINAL phases, that is, you can only specify commands for this shutdown phase.

The Cmd and Rep columns display the number of commands or replies that have been entered or inherited from a linked class for a particular shutdown entry.

You can use the multiple pass feature to issue one or more groups of shutdown commands or replies for all shutdown types except initial shutdown. Commands or replies with 1 in their corresponding pass fields are the entries that are issued during the first attempt at shutting down the subsystem. If, after a specified amount of time (entered in the Shutdown Pass Interval field on this panel) the subsystem is still not down, another attempt (or pass) is made. The next pass runs all entries that have 2 in their pass field. This continues until the subsystem is down. Each pass may consist of zero or more commands and zero or one reply. Note that issuing multiple replies on a single pass is not advisable. Either code secondary replies on subsequent passes or chain them through the automation table and ISSUEREP.

All commands for a given pass are processed before any replies for that pass are processed. After each set of commands and replies is issued, SA z/OS waits for the amount of time defined in the Shutdown Pass Interval field on this panel. After that time, if a call to the application monitor routine shows that the application has not shut down, the commands or reply, or both, defined for the next pass are issued. If a call to the application monitor routine shows that the application has shut down, any subsequent shutdown passes are not processed. If the final termination message is not received within the time specified in AOFSHUTDELAY, SA z/OS assumes that the application is down.

If SA z/OS processes all the shutdown passes defined for an application and the application monitor routine still shows the application as active, a warning is sent to the operator and the application status is set to STUCK.

The next panel that is displayed depends on the type of shutdown processing that you specify in the Cmd field for the shutdown phases on the Subsystem Shutdown Processing panel:

  • Specify command processing for all shutdown types by entering CMD, C or S.
  • Specify reply processing for all shutdown types except FINAL by entering REP or R.

How to proceed is described in the following sections: