Setting up the administrative scheduler on DB2 Version 10 for z/OS®

You can use the administrative task scheduler to execute administrative tasks according to a time-based or event-based schedule.

Before you begin

You should have run job DSNTIJRA and job DSNTIJIN before you set up the administrative task scheduler.

About this task

Restriction: After migration to conversion mode (from Version 8 or Version 9.1), the administrative task scheduler is disabled until you run job DSNTIJRT.

Procedure

  1. Set up the administrative task scheduler.
    1. Customize the administrative task scheduler address space startup procedure (xxxxADMT) in job DSNTIJMV. The name of the startup procedure needs to match the value of the ADMTPROC subsystem parameter. Before using the startup procedure, locate and review the settings for the following parameters:
      DB2SSID
      The name of this DB2 subsystem.
      DFLTUID
      The default ID that is used by the administrative task scheduler to execute its tasks. DFLTUID must be different than the ID that is used to start this address space.
      TRACE
      Indicates whether to activate tracing for the administrative task scheduler. The value can be ON or the default value of OFF.

      You can specify other parameters, such as ERRFREQ, MAXHIST, MAXTHD, or STOPONDB2STOP in the startup procedure similarly to the three parameters DB2SSID, DFLTUID and TRACE.

      ERRFREQ
      Specifies how frequently message DSNA679I displays on the console, indicating that one of the redundant, active copies of the task list is not accessible. By default, this message displays on the console once per minute, for example, when DB2® is offline.
      MAXHIST
      Specifies the number of status entries per task that are stored. This parameter is a positive integer with a default value of 10. When the limit is reached, the oldest status entries are deleted.
      MAXTHD
      Specifies the maximum number of execution threads for an administrative task scheduler. The default value is 99.
      STOPONDB2STOP
      Specifies that the administrative task scheduler will terminate when DB2 is stopped.

      Also, locate and review the ADMTDD1 DD statement. The VSAM data set that is indicated must match the VSAM task list data set that is defined in job DSNTIJIN.

      The following example shows how these parameters can be updated.

      //DSNADMT  PROC LIB='DSN!!0.SDSNLOAD',
      //          DB2SSID=DSN,
      //          DFLTUID=DFLTUID,
      //          TRACE=OFF,
      //          MAXTHD=10 
      //*
      //STARTADM EXEC PGM=DSNADMT0,DYNAMNBR=100,REGION=0K,  
      //          PARM=('DB2SSID=&DB2SSID', 
      //          ' DFLTUID=&DFLTUID',   
      //          ' TRACE=&TRACE'  
      //          ' MAXTHD=&MAXTHD'  
      //          ' ERRFREQ=1440'  
      //          ' STOPONDB2STOP') 
      //STEPLIB  DD DISP=SHR,DSN=&LIB  
      //ADMTDD1  DD DISP=SHR,DSN=DSNC!!0.TASKLIST
    2. Ensure that the administrative task scheduler routines were enabled. They were enabled by job DSNTIJRT.
    3. Create a job to make image copies of the administrative task scheduler table spaces. Establish a schedule for making image copies. In general, you should back up important databases on a regular basis. The database for the administrative task scheduler is no exception and should be copied on the same frequency as the DB2 catalog and directory. The following example shows how to copy the table spaces in this database to stacked data sets on tape with a retention period of 99 days:
      //*
      //DSNTIC  EXEC PGM=DSNUTILB,PARM='DSN,IMAGCOPY',COND=(4,LT)
      //SYSPRINT DD  SYSOUT=*
      //SYSUDUMP DD  SYSOUT=*
      //DSNTRACE DD  SYSOUT=*
      //SYSLISTD DD  *
        LISTDEF DSNLDEF
                INCLUDE TABLESPACES DATABASE DSNADMDB
      //SYSIN    DD  *
      
        TEMPLATE DSNTPLT
                 DSN(prefix.IMAGCOPY.&DB..;&TS.;)
                 DISP (NEW,KEEP,DELETE)
                 UNIT TAPE
                 STACK YES
                 RETPD 99
             COPY LIST DSNLDEF
                 COPYDDN(DSNTPLT)
      /*
  2. Enable the administrative task scheduler and administrative enablement routines.

    The administrative task scheduler routines are DB2-supplied routines that enable you to schedule work. The administrative enablement routines are DB2-supplied routines that enable you to execute administrative work immediately.

    Before you complete these steps, set up WLM application environments for the administrative task scheduler and administrative enablement routines, and either install the DB2-supplied routines during migration or install the DB2-supplied routines during installation. The steps for setting up WLM application environments and installing the DB2-supplied routines are in the IBM® Information Management Software for z/OS Solutions Information Center and the DB2 for z/OS Installation and Migration Guide at http://publib.boulder.ibm.com/epubs/pdf/dsnigm05.pdf in the following locations:

    The following routines are administrative task scheduler routines:

    • ADMIN_TASK_ADD
    • ADMIN_TASK_CANCEL
    • ADMIN_TASK_LIST
    • ADMIN_TASK_OUTPUT
    • ADMIN_TASK_REMOVE
    • ADMIN_TASK_STATUS
    • ADMIN_TASK_UPDATE

    The following routines are administrative enablement routines:

    • ADMIN_COMMAND_DB2
    • ADMIN_COMMAND_DSN
    • ADMIN_COMMAND_UNIX
    • ADMIN_DS_BROWSE
    • ADMIN_DS_DELETE
    • ADMIN_DS_LIST
    • ADMIN_DS_RENAME
    • ADMIN_DS_SEARCH
    • ADMIN_DS_WRITE
    • ADMIN_INFO_HOST
    • ADMIN_INFO_SMS
    • ADMIN_INFO_SQL
    • ADMIN_INFO_SSID
    • ADMIN_INFO_SYSLOG
    • ADMIN_INFO_SYSPARM
    • ADMIN_JOB_CANCEL
    • ADMIN_JOB_FETCH
    • ADMIN_JOB_QUERY
    • ADMIN_JOB_SUBMIT
    • ADMIN_UTL_EXECUTE
    • ADMIN_UTL_MODIFY
    • ADMIN_UTL_MONITOR
    • ADMIN_UTL_SCHEDULE
    • ADMIN_UTL_SORT

    As part of the installation and migration process, job DSNTIJRT defines, binds, and grants access to these DB2–supplied routines.

    1. In the JCL for starting the WLM-established address space for running the stored procedures whose load module must reside in an APF-authorized library, ensure that all libraries in the STEPLIB DD concatenation are APF-authorized.
    2. If the BPX.DAEMON facility class is active and the BPX.DAEMON.HFSCTL facility class is not defined, perform the following actions for the stored procedures that must be registered to RACF® program control.

      The stored procedures that require RACF® program control are:

      • ADMIN_COMMAND_UNIX
      • ADMIN_JOB_CANCEL
      • ADMIN_JOB_FETCH
      • ADMIN_JOB_QUERY
      • ADMIN_JOB_SUBMIT
      1. Customize and run job step DSNADER in job DSNTIJRA to define the security environment for these stored procedures. You need to uncomment job step DSNADER before you run job DSNTIJRA. You do not need to run any other job steps in job DSNTIJRA.
      2. Ensure that you have a WLM environment for these stored procedures that meets the following requirements:
        • The WLM-established stored procedure address space loads only controlled programs.
        • In the JCL for starting the WLM-established address space for running these stored procedures, ensure that all libraries in the STEPLIB DD concatenation are APF-authorized.
        • The name of this environment must match the WLMENV parameter value in the configuration control statement for each stored procedure in job DSNTIJRT.
      Recommendation: If you do not have a WLM environment defined to run these routines, use DB2 core WLM environment DSNWLM_GENERAL, except as follows:
      • ADMIN_COMMAND_DSN - Use DSNWLM_REXX
      • ADMIN_COMMAND_UNIX - Use DSNWLM_PGM_CONTROL
      • ADMIN_INFO_SYSLOG - Use DSNWLM_REXX
      • ADMIN_INFO_SYSPARM - Use DSNWLM_NUMTCB1
      • ADMIN_JOB_CANCEL - Use DSNWLM_PGM_CONTROL
      • ADMIN_JOB_FETCH - Use DSNWLM_PGM_CONTROL
      • ADMIN_JOB_QUERY - Use DSNWLM_PGM_CONTROL
      • ADMIN_JOB_SUBMIT - Use DSNWLM_PGM_CONTROL
      • ADMIN_UTL_MONITOR - Use DSNWLM_PGM_CONTROL

Feedback