Generating batch JCL for Db2® utility jobs

To generate batch JCL to execute the Db2® utility jobs listed below, use the Utilities utility function (3.9). You do not need to know the utility control statements for these operations.
  • COPY
  • LOAD
For an explanation of the uses of these Db2® utility jobs, refer to the Db2® Utility Guide and Reference.
Note: To successfully execute the generated utility job, you must have the appropriate Db2® privileges on any Db2® objects that are referenced.

The main panel for the Utilities utility is the Db2® Utilities panel.

To display the Db2® Utilities panel,

  1. From the Primary Option Menu panel, enter 3 (Utilities) to display the Utility Functions panel.
  2. From the Utility Functions panel, enter 9 (Utilities)
Use the fields on the Db2® Utilities panel to select:
  • The type of Db2® utility you want to run
  • The type of Db2® object that the utility processes
  • Details of the particular Db2® objects you want to run a utility on

When you press Enter, all objects at the local Db2® server are displayed, unless you entered information in the Db2® Object Details fields on the Db2® Utilities panel in which case the displayed rows are limited to the objects that match the information you have specified.

The JCL for the Db2® utility job is generated and presented in an ISPF edit session. You can make any required changes prior to submitting the job, or use the ISPF editor commands to save a copy of the JCL for later use.

Db2 utilities you can use with Db2 objects show which Db2® utilities you can use with which Db2® objects.
Table 1. Db2® utilities you can use with Db2® objects

This table has six columns, except for the heading row, where the second heading "Use with these Db2® objects" spans five columns, the subheadings "1. Tables", "2. Table spaces", "3. Index spaces", "4. Indexes", and "5. Indexes for table space".

Db2® utility Use with these Db2® objects
1. Tables 2. Table spaces 3. Index spaces 4. Indexes 5. Indexes for table space
1. COPY Yes (see COPY (table spaces)) Yes (see COPY (index spaces))
2. LOAD Yes (see LOAD utility)
3. REBUILD Yes (see REBUILD utility (indexes)) Yes (see REBUILD utility (indexes for table spaces))
4. RECOVER Yes (see RECOVER (table spaces)) Yes (see RECOVER (index spaces))
5. REORG Yes (see REORG (table spaces)) Yes (see REORG (indexes))
6. RUNSTATS Yes (see RUNSTATS (table spaces)) Yes (see RUNSTATS (indexes))
7. UNLOAD Yes (see UNLOAD (tables)) Yes (see UNLOAD (table spaces))

Related tasks

Related references