Invoking Db2 online utilities

To invoke Db2 online utilities, Db2 must be up and running.

Before you begin

Make sure that you are authorized to run the utility that you want to invoke. You can check the required authorization in the documentation for each utility.

Procedure

To run Db2 online utilities:

  1. Prepare the necessary data sets.

    For more information about allocating data sets for utilities, see Data sets that online utilities use. For a list of the data sets that are required for a utility, see the documentation for that utility.

  2. Create a utility control statement.

    For general information about utility control statements, see Utility control statements. For information about statement syntax for a utility, see the documentation for that utility.

    Some utilities can operate at the partition level. For those utilities, any reference in the utility statement to a partition number denotes the physical partition number unless otherwise specified. Similarly, any partition numbers that are included in the utility output are the physical partition numbers.

  3. Check for any concurrency and compatibility restrictions.
    These restrictions limit what other utilities and processes can run at the same time. For a list of restrictions, see the documentation for the utility that you want to use.

    If the utility supports parallelism, it can use additional threads to support the parallel subtasking. Consider increasing the values of subsystem parameters that control threads, such as MAX BATCH CONNECT and MAX USERS.

  4. Invoke the utility by using one of the following methods:
    Requirement: In the JCL for all utility jobs, specify a load library (prefix.SDSNLOAD) that is at a maintenance level that is compatible with the Db2 subsystem. Otherwise, errors can occur.

    Data Sharing: When you submit a utility job, specify the name of the Db2 subsystem to which the utility is to attach, the group attachment name, or subgroup attachment name. If you do not use the group attachment name or subgroup attachment name, the utility job must run on the z/OS system where the specified Db2 subsystem is running. Ensure that the utility job runs on the appropriate z/OS system. To do so, use one of several z/OSinstallation-specific statements, such as:

    • For JES2 multi-access spool (MAS) systems, insert the following statement into the utility JCL:
      /*JOBPARM SYSAFF=cccc
    • For JES3 systems, insert the following statement into the utility JCL:
      //*MAIN SYSTEM=(main-name)

    Your installation might have other mechanisms for controlling where batch jobs run, such as using job classes.

Results

If the utility fails, you can either terminate it or restart it.