Previous Topic: DB2 Utilities Supported by CA GenNext Topic: RECOVER Utility


COPY Utility

The DB2 COPY utility creates an image copy of a table space or a data set within a table space. It does not copy indexes. You can recover indexes from recovered table spaces.

There are two types of image copies, a full image copy that copies all pages in a table space or data set and an incremental image copy that copies only the pages that are modified since the last COPY utility executed.

Note: CA Gen generates the JCL to support the full image copy only.

The COPY utility writes all pages from the table space to the output data set. If the table space includes multiple data sets, the COPY utility writes each data set to a separate output data set.

The generated JCL is for a Generation Data Group (GDG) tape copy. The high-level node in the GDG index is your TSO user ID. This can be changed in the generated JCL before the COPY utility job is submitted.

Use the DB2 Copy Utility to select the table spaces to copy.

DB2 Copy Utility Row 1 to 5 of 5 COMMAND ===> SCROLL ===> PAGE Model name . . . : GEN SAMPLE MODEL Business system . : CORPORATE_MANAGEMENT Data base . . . . : GENDB Type S beside each table space you wish to copy, then press enter or press F12 to cancel. S Table Space _ T0000131 _ T0000135 _ T0000140 _ T0000144 _ T0000148 ******************************* Bottom of data ********************************

The following example of the JCL generated for the COPY utility that is based on the selections that are made with the DB2 COPY utility.

EDIT ---- DAAAXXX.TICTEMP1.TIDUTJCL ------------------ COLUMNS 001 072
COMMAND ===>                                          SCROLL ===> CSR
****** ***************************** TOP OF DATA ***************
000001 //DAAAXXX JOB(ACCOUNT INFO)
000002 //*TEST JCL SAVED
000003 //*
000004 //*
000005 //*
000006 //*
000007 //*
000008 //*
000009 //*
000010 //* *****************************************************
000011 //* * DEFINE GDG MODEL FOR UTILITIES *
000012 //* *****************************************************
000013 //STEPDCB EXEC PGM=IEFBR14
000014 //MODEL DD DSN=DAAAXXX.GDG,DISP=(NEW,CATLG,KEEP),UNIT=SPACE,
000015 // SPACE=(TRK,0)
000016 //* *****************************************************
000017 //* * DEFINE GDGS FOR COPY UTILITY *
000018 //* *****************************************************
000019 //STEP1 EXEC PGM=IDCAMS,COND=EVEN
000020 //SYSPRINT DD SYSOUT=*
000021 //SYSUDUMP DD DUMMY
000022 //SYSIN DD *
000023 DEF GDG (NAME(DAAAXXX.DB2T.COPY.T0000131) LIM(10))
000024 DEF GDG (NAME(DAAAXXX.DB2T.COPY.T0000135) LIM(10))
000025 SET MAXCC = 0
000026 /*
000027 //STEPCOPY EXEC PGM=DSNUTILB,REGION=1024K,
000028 // PARM='DB2T,CD000310',COND=EVEN
000029 //*
000030 //STEPLIB DD DSN=SYS1.DB2.LINKLIB,DISP=SHR
000031 //*
000032 //SYSPRINT DD SYSOUT=*
000033 //SYSUDUMP DD SYSOUT=*
000034 //T0000131 DD DSN=DAAAXXX.DB2T.COPY.T0000131(+1),
000035 // DISP=(NEW,CATLG,DELETE),
000036 // UNIT=TAPE,VOL=(,RETAIN),
000037 // LABEL=(1,SL),
000038 // DCB=(DAAAXXX.GDG)
000039 //T0000135 DD DSN=DAAAXXX.DB2T.COPY.T0000135(+1),
000040 // DISP=(NEW,CATLG,DELETE),
000041 // UNIT=AFF=T0000131,VOL=(,RETAIN,REF=*.T0000131),
000042 // LABEL=(2,SL),
000043 // DCB=(DAAAXXX.GDG)
000044 //SYSIN DD *
000045 COPY TABLESPACE GENDB.T0000131
000046 DSNUM ALL
000047 COPYDDN T0000131
000048 DEVT TAPE
000049 FULL YES
000050 SHRLEVEL REFERENCE
000051 COPY TABLESPACE GENDB.T0000135
000052 DSNUM ALL
000053 COPYDDN T0000135
000054 DEVT TAPE
000055 FULL YES
000056 SHRLEVEL REFERENCE
000057 /*
000058 //
****** **************************** BOTTOM OF DATA *************