z/OS DFSMShsm Implementation and Customization Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the RESTART keyword to automatically restart DFSMShsm after an abnormal end

z/OS DFSMShsm Implementation and Customization Guide
SC23-6869-01

If you are running DFSMShsm in an MVS/ESA environment, you can use the RESTART keyword in the DFSMShsm startup procedure to automatically restart DFSMShsm after an abnormal termination.

When you specify the RESTART keyword in the DFSMShsm start procedure, no operator intervention is required to automatically restart DFSMShsm. The protocol for the RESTART keyword is: RESTART=(A,B), where A is required and is the name of the DFSMShsm procedure to be started, and B is optional and specifies any additional parameters to be passed to the procedure.

Figure 1 is an example of the DFSMShsm startup procedure. Notice that the EMERG keyword NO allows all DFSMShsm functions and that the RESTART keyword restarts DFSMShsm automatically. However, when DFSMShsm is restarted the status of the EMERGENCY keyword in the restarted procedure is YES. When EMERG=YES, DFSMShsm does not allow any functions to start.

Figure 1. Example of Automatically Restarting DFSMShsm. The status of the keyword EMERG is changed when DFSMShsm automatically restarts.
//**********************************************************************/
//* EXAMPLE DFSMSHSM STARTUP PROCEDURE THAT SPECIFIES THE RESTART      */
//* KEYWORD TO RESTART DFSMSHSM WITH A DIFFERENT STATUS FOR THE EMERG  */
//* KEYWORD.                                                           */
//**********************************************************************/
//*
//DFSMSHSM   PROC CMD=00,         USE PARMLIB MEMBER ARCCMD00
//            LOGSW=YES,          SWITCH LOGS AT STARTUP
//            STARTUP=YES,        STARTUP INFO PRINTED AT STARTUP
//            UID=HSM,            DFSMSHSM-AUTHORIZED USER ID
//            PDA=YES,            BEGIN PDA TRACING AT STARTUP
//            SIZE=0M,            REGION SIZE FOR DFSMSHSM
//            DDD=50,             MAX DYNAMICALLY ALLOCATED DATA SETS
//            HOST=?HOSTID,       PROC.UNIT ID AND LEVEL FUNCTIONS
//            PRIMARY=?PRIMARY,   LEVEL FUNCTIONS
//            RESTART='(DFHSM00,EMERG=YES)'    RESTART INFORMATION
//DFSMSHSM  EXEC PGM=ARCCTL,DYNAMNBR=&DDD,REGION=&SIZE,TIME=1440,
//          PARM=('LOGSW=&LOGSW','CMD=&CMD','UID=&UID',
//          'HOST=&HOSTID','PRIMARY=&PRIMARY',
//          'STARTUP=&STARTUP','PDA=&PDA','RESTART=&RESTART')
//**********************************************************************/
//*     HSMPARM DD must be deleted from the JCL or made into a         */
//*         a comment to use Concatenated PARMLIB support.             */
//**********************************************************************/
//HSMPARM  DD DSN=SYS1.PARMLIB,DISP=SHR
//MSYSOUT  DD SYSOUT=A
//MSYSIN   DD DUMMY
//SYSPRINT DD SYSOUT=A,FREE=CLOSE
//SYSUDUMP DD SYSOUT=A
//MIGCAT   DD DSN=&UID...MCDS,DISP=SHR
//BAKCAT   DD DSN=&UID...BCDS,DISP=SHR
//OFFCAT   DD DSN=&UID...OCDS,DISP=SHR
//JOURNAL  DD DSN=&UID...JRNL,DISP=SHR
//ARCLOGX  DD DSN=&UID...HSMLOGX1,DISP=OLD
//ARCLOGY  DD DSN=&UID...HSMLOGY1,DISP=OLD
//ARCPDOX  DD DSN=&UID...HSMPDOX1,DISP=OLD
//ARCPDOY  DD DSN=&UID...HSMPDOY1,DISP=OLD
//*

Figure 2 shows an alternate way of obtaining the same results; restart DFSMShsm using a different startup procedure with a different name.

Upon an abnormal termination of DFHSM00, DFHSM05, shown in Figure 3, is started with an identifier of HSM. The procedure DFHSM05 does not specify a RESTART keyword and specifies EMERG=YES. If DFSMShsm ends with an abnormal termination, DFSMShsm does not automatically restart.

Rule: Any alternate procedures (DFHSM05, for example) must have an entry in the RACF® started-procedures table and must be associated with the DFSMShsm user ID for RACF.

Figure 2. Example of Automatically Restarting DFSMShsm with a Different Procedure. If an abnormal end occurs, the startup procedure calls a different startup procedure (DFHSM05), shown in Figure 3.
//**********************************************************************/
//* EXAMPLE DFSMSHSM STARTUP PROCEDURE THAT RESTARTS DFSMSHSM WITH A   */
//* DIFFERENT STARTUP PROCEDURE (DFHSM05) AFTER AN ABEND.              */
//**********************************************************************/
//*
//DFSMSHSM   PROC CMD=00,         USE PARMLIB MEMBER ARCCMD00
//            LOGSW=YES,          SWITCH LOGS AT STARTUP
//            STARTUP=YES,        STARTUP INFO PRINTED AT STARTUP
//            UID=HSM,            DFSMSHSM-AUTHORIZED USER ID
//            PDA=YES,            BEGIN PDA TRACING AT STARTUP
//            SIZE=0M,            REGION SIZE FOR DFSMSHSM
//            DDD=50,             MAX DYNAMICALLY ALLOCATED DATA SETS
//            HOST=?HOSTID,       PROC.UNIT ID AND LEVEL FUNCTIONS
//            PRIMARY=?PRIMARY,   LEVEL FUNCTIONS
//            RESTART='(DFHSM05,EMERG=YES)'    RESTART INFORMATION
//DFSMSHSM  EXEC PGM=ARCCTL,DYNAMNBR=&DDD,REGION=&SIZE,TIME=1440,
//          PARM=('LOGSW=&LOGSW','CMD=&CMD','UID=&UID',
//          'HOST=&HOSTID','PRIMARY=&PRIMARY',
//          'STARTUP=&STARTUP','PDA=&PDA','RESTART=&RESTART')
//**********************************************************************/
//*     HSMPARM DD must be deleted from the JCL or made into a         */
//*         a comment to use Concatenated PARMLIB support.             */
//**********************************************************************/
//HSMPARM  DD DSN=SYS1.PARMLIB,DISP=SHR
//MSYSOUT  DD SYSOUT=A
//MSYSIN   DD DUMMY
//SYSPRINT DD SYSOUT=A,FREE=CLOSE
//SYSUDUMP DD SYSOUT=A
//MIGCAT   DD DSN=&UID...MCDS,DISP=SHR
//BAKCAT   DD DSN=&UID...BCDS,DISP=SHR
//OFFCAT   DD DSN=&UID...OCDS,DISP=SHR
//JOURNAL  DD DSN=&UID...JRNL,DISP=SHR
//ARCLOGX  DD DSN=&UID...HSMLOGX1,DISP=OLD
//ARCLOGY  DD DSN=&UID...HSMLOGY1,DISP=OLD
//ARCPDOX  DD DSN=&UID...HSMPDOX1,DISP=OLD
//ARCPDOY  DD DSN=&UID...HSMPDOY1,DISP=OLD
//*
Figure 3. Example of Alternate Startup Procedure
//**********************************************************************/
//* EXAMPLE DFHSM05 STARTUP PROCEDURE THAT IS CALLED FROM THE          */
//* PRECEDING STARTUP PROCEDURE FOR UNEXPECTED DFSMSHSM ABENDS.        */
//**********************************************************************/
//*
//DFSMSHSM   PROC CMD=00,         USE PARMLIB MEMBER ARCCMD00
//            LOGSW=YES,          SWITCH LOGS AT STARTUP
//            STARTUP=YES,        STARTUP INFO PRINTED AT STARTUP
//            UID=HSM,            DFSMSHSM-AUTHORIZED USER ID
//            PDA=YES,            BEGIN PDA TRACING AT STARTUP
//            SIZE=0M,            REGION SIZE FOR DFSMSHSM
//            DDD=50,             MAX DYNAMICALLY ALLOCATED DATA SETS
//            HOST=?HOSTID,       PROC.UNIT ID AND LEVEL FUNCTIONS
//            PRIMARY=?PRIMARY    LEVEL FUNCTIONS
//DFSMSHSM  EXEC PGM=ARCCTL,DYNAMNBR=&DDD,REGION=&SIZE,TIME=1440,
//          PARM=('LOGSW=&LOGSW','CMD=&CMD','UID=&UID',
//          'HOST=&HOSTID','PRIMARY=&PRIMARY',
//          'STARTUP=&STARTUP','PDA=&PDA'
//                        .
//                        .
//                        .
//                        .

As you can see, the RESTART keyword not only allows you to tell DFSMShsm to restart itself, but allows you to modify the manner in which DFSMShsm is restarted when an abnormal termination occurs. Any keyword that can be specified in the MVS™ start command can be specified in the RESTART keyword as part of parameter B.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014