You can invoke DB2® online utilities by using any of
a variety of methods.
Before you begin
Make sure that you are authorized to run the utility that you want to invoke. You can check the
authorization that is required in the documentation for each utility.
If any of following situations apply, check for any additional authorization restrictions or
requirements in Privileges and authorization IDs for DB2 utilities:
- The target object is a table that has multilevel security with row-level granularity.
- You plan to run the utilities in a trusted context.
About this task
Some utilities can
operate at the partition level. For those utilities, any reference 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.
Procedure
To run DB2 online utilities:
- Prepare the necessary data sets. For more information about allocating data sets for utilities and a list of the data sets that
are required for each utility, see Data sets that online utilities use.
- Create a utility control statement. For general information about utility control statements, a list of the syntax for each
utility, and a list of sample control statements, see Utility control statements.
- 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 Utility concurrency and compatibility.
- Invoke the online 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/OS installation-specific statements, such as:
Your installation might have other mechanisms for controlling where batch jobs run, such as by
using job classes.
Results
If the utility fails, you can either terminate it or restart it.