Invoking an online utility by using the DB2 Utilities panel in DB2I

One way to invoke DB2® online utilities is to use the DB2 Utilities panel. Consider using this method if you do not have much JCL knowledge.
Restriction: You cannot use the DB2 Utilities panel in DB2I to submit the following utility jobs:
  • a BACKUP SYSTEM job
  • a COPYTOCOPY job
  • a RESTORE SYSTEM job
  • a COPY job for a list of objects.

Procedure

To invoke an online utility by using the DB2 Utilities panel in DB2I:

  1. Create the utility control statement for the online utility that you want to invoke, and save it in a sequential or partitioned data set. For more information about utility control statements, see Utility control statements.
    Example scenario: Save the following COPY utility control statement in the UTIL data set. (The UTIL data set is the default statement data set on the DB2 Utilities panel.)
    COPY TABLESPACE DSN8D10A.DSN8S10D
      FULL NO
      SHRLEVEL CHANGE
  2. From the ISPF Primary Option menu, select the DB2I menu.
  3. On the DB2I Primary Option Menu, select the UTILITIES option.

    The DB2 Utilities panel is displayed. Items that you must specify are highlighted in the following figure:

    Figure 1. DB2 Utilities panel
    DSNEUP01                         DB2 UTILITIES
     ===>
     
     Select from the following:
     
      1 FUNCTION ===> EDITJCL   (SUBMIT job, EDITJCL, DISPLAY, TERMINATE)
      2 JOB ID   ===> TEMP      (A unique job identifier string)
      3 UTILITY  ===> COPY      (CHECK DATA, CHECK INDEX, CHECK LOB,
    
                                 COPY, DIAGNOSE, LOAD, MERGE, MODIFY,
                                 QUIESCE, REBUILD, RECOVER, REORG INDEX,
                                 REORG LOB, REORG TABLESPACE, REPORT,
                                 REPAIR, RUNSTATS, STOSPACE, UNLOAD.)
     
      4 STATEMENT DATA SET  ===>   UTIL
     
     Specify restart or preview option, otherwise specify NO.
     
      5 RESTART  ===> NO         (NO, CURRENT, PHASE or PREVIEW)
     
      6 LISTDEF? (YES|NO) ===> NO       TEMPLATE? (YES|NO) ===> NO
     
      7 LIB ==>                  (BLANK or DB2 LIB NAME) 
    
    *  The data set names panel will be displayed when required by a utility.
     
     
     PRESS:  ENTER to process     END to exit    HELP for more information
     
  4. Complete the fields as follows and press Enter:
    Field 1
    Specify one of the following options:
    SUBMIT
    The generated JCL is submitted for processing after you complete this panel and any subsequent panels. You cannot edit the JCL.
    EDITJCL
    You can edit the generated JCL before you submit the utility job.

    If your site does not have default JOB and ROUTE statements, you must edit the JCL to define them.

    The other two options for this field, DISPLAY and TERMINATE, are not part of invoking a utility. DISPLAY performs the same function as the DISPLAY UTILITY command; it shows the status of a utility job. TERMINATE performs the same function as the TERM UTILITY command; it terminates a utility.

    Example scenario: Specify EDITJCL.
    Field 2
    Specify a unique identifier for your utility job. The default value is TEMP.
    Example scenario: The default TEMP value is satisfactory; leave it as is.
    Field 3
    Specify the utility that you want to run.
    Example scenario: Specify COPY.
    Field 4
    Specify the data set that contains the utility control statement. Unless you enclose the data set name between apostrophes, TSO adds your user identifier as a prefix. The default data set is UTIL.
    Example scenario: Leave the default value UTIL.
    Field 5
    If you want to restart a stopped utility, specify CURRENT or PHASE. If you want to run a utility in PREVIEW mode, specify PREVIEW. Otherwise, leave the default value of NO.
    Example scenario: Leave the default value, NO.
    Field 6
    Specify whether you are using LISTDEF statements or TEMPLATE statements for this utility job.
    Example scenario: Specify NO.
    Field 7
    If you want the generated JCL to use a DB2 subsystem library other than the default, specify the data set name of the DB2 subsystem library.
    Example scenario: Leave this field blank.
  5. If the Data Set Names panel is displayed, complete the fields on that panel. This panel is displayed if you specified COPY, LOAD, MERGECOPY, REORG TABLESPACE, or UNLOAD on the DB2 Utilities panel as the utility that you want to invoke.
    Figure 2. Data Set Names panel
    DSNEUP02                         DATA SET NAMES
     ===>
     
       Enter data set name for LOAD or REORG TABLESPACE:
    1 RECDSN   ==>
     
       Enter data set name for
    LOAD, REORG TABLESPACE or UNLOAD:
    2 DISCDSN  ==>
     
       Enter output data sets for local/current site for COPY, MERGECOPY,
         LOAD, or REORG:
    3 COPYDSN  ==> ABC
    4 COPYDSN2 ==>
     
       Enter output data sets for recovery site for COPY, LOAD, or REORG:
    5 RCPYDSN1 ==> ABC1
    6 RCPYDSN2 ==>
       Enter output data sets for REORG or UNLOAD:
    7 PUNCHDSN ==>
     PRESS:  ENTER to process     END to exit    HELP for more information
     

    Complete the field as follows and press Enter:

    Field 1
    Complete this field if you are running LOAD, REORG TABLESPACE, or UNLOAD. For LOAD, specify the data set name that contains the records that are to be loaded. For REORG TABLESPACE or UNLOAD, specify the unload data set.
    Example scenario: You do not need to complete field 1, because you are running COPY.
    Field 2
    If you are running LOAD or REORG TABLESPACE with discard processing, specify a discard data set.
    Example scenario: You do not need to complete field 1, because you are running COPY.
    Field 3
    Complete this field as follows:
    • If you are running COPY, LOAD, or REORG TABLESPACE, specify the primary output data set name for the local site.
    • If you are running MERGECOPY, specify the primary output data set name for the current site.
    The DD name that the panel generates for this field is SYSCOPY. This field is optional for the following jobs:
    • LOAD
    • REORG TABLESPACE with the SHRLEVEL NONE option
    This field is required for the following jobs:
    • COPY
    • MERGECOPY
    • REORG TABLESPACE with the SHRLEVEL REFERENCE or SHRLEVEL CHANGE options.
    Example scenario: Specify ABC as the primary output data set name for the local site.
    Field 4
    Complete this field as follows:
    • If you are running COPY, LOAD, or REORG TABLESPACE, specify the backup output data set name for the local site.
    • If you are running MERGECOPY, specify the backup output data set name for the current site.
    The DD name that the panel generates for this field is SYSCOPY2. This field is an optional field.
    Example scenario: Leave this field blank.
    Field 5
    If you are running COPY, LOAD, or REORG TABLESPACE, specify the primary output data set for the recovery site. The DD name that the panel generates for this field is SYSRCOPY1. This field is optional.
    Example scenario: Specify ABC1 as the primary output data set name for the recovery site.
    Field 6
    If you are running COPY, LOAD, or REORG TABLESPACE, specify the backup output data set for the recovery site. The DD name that the panel generates for this field is SYSRCOPY2. This field is optional.
    Example scenario: Leave this field blank.
    Field 7
    If you are running any of the following utility jobs, specify the output data set for the generated LOAD utility control statements:
    • REORG TABLESPACE with the UNLOAD EXTERNAL or DISCARD options
    • UNLOAD
    The DD name that the panel generates for this field is SYSPUNCH.
    Example scenario: Leave this field blank.
  6. If the Control Statement Data Set Names panel is displayed, complete the fields on that panel. The field entries are optional. This panel is displayed if you specified YES in the LISTDEF field or TEMPLATE field on the DB2 Utilities panel.
    Figure 3. Control Statement Data Set Names panel
    DSNEUP03         CONTROL STATEMENT DATA SET NAMES             SSID:  
    ===>                                                                 
                                                                         
    Enter the data set name for the LISTDEF data set (SYSLISTD DD):      
     1 LISTDEF DSN  ===>                                         
        OPTIONAL or IGNORED                                                        
                                                                         
    Enter the data set name for the TEMPLATE data set (SYSTEMPL DD):     
     2 TEMPLATE DSN ===>                                        
        OPTIONAL or IGNORED                                                        
                                                                         
                                                                         
    PRESS:  ENTER to process     END to exit   HELP for more information 

    Complete the fields as follows and press Enter:

    Field 1
    Specify the data set that contains a LISTDEF control statement. The default is the SYSIN data set. This field is ignored if you specified NO in the LISTDEF field in the DB2 Utilities panel.
    Field 2
    Specify the data set that contains a TEMPLATE control statement. The default is the SYSIN data set. This field is ignored if you specified NO in the TEMPLATE field in the DB2 Utilities panel.
  7. If the JCL is displayed, edit the JCL as needed and then type SUBMIT on the editor command line. The JCL is displayed if you selected EDITJCL in field 1 on the DB2 Utilities panel. Otherwise, if you selected SUBMIT in field 1, the JCL is not displayed for editing.

Results

The generated JCL is submitted. You can view the output of the job as you normally would view the output of any batch job on your system. One common way is by using System Display and Search Facility (SDSF).