Module 2: Running Db2 utilities
IBM® Db2 utilities are tools that help maintain data in your Db2 for z/OS databases. Generally, you use Db2 utilities to perform large-scale operations across one or more table spaces. You can use several different methods to run Db2 utilities. This module shows you two of these methods: using a Db2 Interaction (DB2I) panel and writing job control language (JCL) jobs.
Learning objectives
In this module, you will learn how to do the following tasks:
- Run utilities by using a DB2I panel
- Run utilities by writing and submitting JCL jobs
- View the results of utility jobs
Time required
1 hourBefore you begin
- Make sure that you complete the prerequisites that are listed in the introduction to this tutorial.
- Verify that the Db2 Utilities Suite for z/OS (5698-DUT, FMID HDBDD1K) is installed on your system.
- Obtain authority to run the COPY, LOAD, and UNLOAD utilities. For a list of required authorizations for these utilities, see the following information:
- Create or obtain access to a partitioned data set to contain your work. Contact your system administrator to find out the conventions for data sets at your site, or accept the default values. This tutorial assumes that the data set is named USER.SRCLIB.TUTORIAL.
- Log on to z/OS by using a TSO session.
- Create the MY_EMP table under your authorization ID and populate it, as described in Lesson 1.2: Creating a table.
- Lesson 2.1: Running the UNLOAD utility from DB2I
Db2 Interactive (DB2I) is a quick way to run a utility without knowing job control language (JCL). You can run most online utilities from the DB2 Utilities panel in DB2I. - Lesson 2.2: Running the LOAD utility from DB2I
You can use the LOAD utility to load data into one or more tables. You can also insert rows by using SQL INSERT statements, but LOAD is a more efficient way to add a large number of rows. - Lesson 2.3: Running the COPY utility from a JCL job
Writing job control language (JCL) jobs is a common way to run utilities. Although the JCL standards for your company might differ, this tutorial gives you an idea of how the process works.