Copying the DB2 UDB for z/OS Catalog Using the COPY Utility

Abstract

PTF UQ80075 for APAR PQ74307, closed in October 16, 2003, terminates the COPY utility job with CC=8 when DSNDB01.SYSUTILX is in the same SYSIN as other catalog objects.

Contents

The IBM Redbook DB2 for z/OS and OS/390 Version 7 Using the Utilities Suite, SG24-6289, provides several examples of executing DB2 utilities. Appendix B shows a sample job stream to use when securing the catalog and directory objects using the COPY utility. It illustrates a method of using LISTDEF and TEMPLATE utility control statements when processing the catalog and directory objects, where the use of wildcards is not allowed. At the time of writing this redbook, a COPY utility job, which had DSNDB01.SYSUTILX in the same SYSIN as other catalog objects, worked fine. However, the COPY utility on SYSUTILX is an “exclusive” job; such a job can interrupt another job between job steps, possibly causing the interrupted job to time out. To run on DSNDB01.SYSUTILX, the COPY utility must be the only utility in the job step. Also, if SHRLEVEL REFERENCE is specified, the COPY job of DSNDB01.SYSUTILX must be the only utility running in a DB2 data sharing group.

PTF UQ80075 for APAR PQ74307 has enforced this restriction, so the utility job terminates with CC=8 when DSNDB01.SYSUTILX is in the same SYSIN as other catalog objects.

APAR PQ74307
The following text is an extract of the APAR description:

PROCESSING NOT STOPPED AFTER DSNU182I

Summary Page
APAR Identifier: PQ74307 Last Changed: 03/11/02
Symptom: IN INCORROUT Status: CLOSED PER
Severity: 3 Date Closed: 03/09/16
Component: 5740XYR00 Duplicate of:
Reported Release: 710
Component Name: 5740

PTF List: Release 710 : UQ80075 available 03/10/02 (F310)

Submitter Page
Description: OPTIONS EVENT(ITEMERROR,SKIP) is causing processing
to not stop after DSNU182I.
Suggestion of wording in manual:
"When copying SYSUTILX no other utility
statements are allowed in the SYSIN".

Responder Page
Summary:
****************************************************************
* USERS AFFECTED: ALL DB2 UDB FOR OS/390 AND z/OS V7 USERS. *
****************************************************************
* PROBLEM DESCRIPTION: WHEN OPTIONS EVENT(ITEMERROR,SKIP) *
* IS SPECIFIED, PROCESSING IS NOT *
* STOPPED AS EXPECTED IF MSGDSNU182I *
* IS RECEIVED. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
User ran a utility job with syntax similar to the following:
.
OPTIONS EVENT(ITEMERROR,SKIP)
...
COPY TABLESPACE DSNDB01.SYSUTILX...
COPY TABLESPACE A1.B1
COPY TABLESPACE A2.B2
.
MSGDSNU182I (COPY MUST BE THE ONLY UTILITY IN SYSIN) was
correctly received, but this should have caused the job to
terminate. Instead, the job continued, which could
potentially lead to various other problems.
This problem exists for COPY, CONCURRENT COPY, RECOVER,
and QUIESCE utilities.

Problem
Conclusion: Code was changed so that MSGDSNU182I will cause the job to
terminate properly, even if OPTIONS EVENT (ITEMERROR, SKIP)
is specified.

Sample job stream for COPYing catalog and directory objects
The following procedure is an updated sample procedure to execute the COPY utility on catalog and directory objects:

//C713420X JOB (IVDB2001),'NAIDOO DB2',MSGCLASS=X,CLASS=Q, JOB01440
// NOTIFY=C713420
/*XEQ A02
//*
//TERM1 EXEC DB2CMD,SYSTEM=DB2H
//SYSTSIN DD *
DSN SYSTEM(DB2H)
-TERM UTIL(RAMA*)
END
//*
//COPY1 EXEC DSNUPROC,SYSTEM=DB2H,UID=RAMA1
//SYSIN DD *

OPTIONS EVENT ( ITEMERROR, SKIP )

LISTDEF LIST1
INCLUDE TABLESPACE DSNDB01.DBD01
INCLUDE TABLESPACE DSNDB01.SPT01
INCLUDE TABLESPACE DSNDB01.SCT02
INCLUDE TABLESPACE DSNDB06.SYSDBASE
INCLUDE TABLESPACE DSNDB06.SYSDBAUT
INCLUDE TABLESPACE DSNDB06.SYSDDF
INCLUDE TABLESPACE DSNDB06.SYSGPAUT
INCLUDE TABLESPACE DSNDB06.SYSGROUP
INCLUDE TABLESPACE DSNDB06.SYSGRTNS
INCLUDE TABLESPACE DSNDB06.SYSHIST
INCLUDE TABLESPACE DSNDB06.SYSJAUXA
INCLUDE TABLESPACE DSNDB06.SYSJAUXB
INCLUDE TABLESPACE DSNDB06.SYSJAVA
INCLUDE TABLESPACE DSNDB06.SYSOBJ
INCLUDE TABLESPACE DSNDB06.SYSPKAGE
INCLUDE TABLESPACE DSNDB06.SYSPLAN
INCLUDE TABLESPACE DSNDB06.SYSSEQ
INCLUDE TABLESPACE DSNDB06.SYSSEQ2
INCLUDE TABLESPACE DSNDB06.SYSSTATS
INCLUDE TABLESPACE DSNDB06.SYSSTR
INCLUDE TABLESPACE DSNDB06.SYSUSER
INCLUDE TABLESPACE DSNDB06.SYSVIEWS

TEMPLATE ICOPY
DSN(IVDB2GL.&DB..&TS..D&DT..T&TI.)
DISP (NEW,CATLG,DELETE)
UNIT SYSALLDA SPACE(30,30) CYL

COPY LIST LIST1 SHRLEVEL CHANGE PARALLEL 6
COPYDDN(ICOPY)

//*
//COPY2 EXEC DSNUPROC,SYSTEM=DB2H,UID=RAMA2
//SYSIN DD *

OPTIONS EVENT ( ITEMERROR, SKIP )

TEMPLATE ICOPY
DSN(IVDB2GL.&DB..&TS..D&DT..T&TI.)
DISP (NEW,CATLG,DELETE)
UNIT SYSALLDA SPACE(15,15) CYL

COPY TABLESPACE DSNDB06.SYSCOPY
SHRLEVEL CHANGE
COPYDDN(ICOPY)
//*
//COPY3 EXEC DSNUPROC,SYSTEM=DB2H,UID=RAMA3
//SYSIN DD *

OPTIONS EVENT ( ITEMERROR, SKIP )

TEMPLATE ICOPY
DSN(IVDB2GL.&DB..&TS..D&DT..T&TI.)
DISP (NEW,CATLG,DELETE)
UNIT SYSALLDA SPACE(15,15) CYL

COPY TABLESPACE DSNDB01.SYSLGRNX
SHRLEVEL CHANGE
COPYDDN(ICOPY)
//*
//COPY4 EXEC DSNUPROC,SYSTEM=DB2H,UID=RAMA4
//SYSIN DD *

OPTIONS EVENT ( ITEMERROR, SKIP )

TEMPLATE ICOPY
DSN(IVDB2GL.&DB..&TS..D&DT..T&TI.)
DISP (NEW,CATLG,DELETE)
UNIT SYSALLDA SPACE(15,15) CYL

COPY TABLESPACE DSNDB01.SYSUTILX
SHRLEVEL CHANGE
COPYDDN(ICOPY)
//*
//TERM2 EXEC DB2CMD,SYSTEM=DB2H,COND=EVEN
//SYSTSIN DD *
DSN SYSTEM(DB2H)
-TERM UTIL(RAMA*)
END
//*

Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

Profile

Publish Date
18 August 2005


Rating: Not yet rated


Author(s)

IBM Form Number
TIPS0587