//JOBNAME JOB ,'BACKUP',MSGCLASS=H,CLASS=A,NOTIFY=&SYSUID
//UTIL EXEC DSNUPROC,SYSTEM=DB2,UID='UTILID',UTPROC=''
//**********************************************
//* FULL IMAGE COPY UTILITY
//**********************************************//DSNUPROC.SYSCOPY DD DSN=USERID.FULL.COPY,
// DISP=(MOD,CATLG),
// SPACE=(CYL,(50,50),RLSE),
// UNIT=SYSALLDA
//DSNUPROC.SYSIN DD *
COPY TABLESPACE DBNAME.TSNAME SHRLEVEL REFERENCE
FULL YES
Sample job for incremental image copy://JOBNAME JOB ,'BACKUP',MSGCLASS=H,CLASS=A,NOTIFY=&SYSUID
//UTIL EXEC DSNUPROC,SYSTEM=DB2,UID='UTILID',UTPROC=''
//**********************************************
//* INCREMENTAL IMAGE COPY UTILITY
//**********************************************//DSNUPROC.SYSCOPY DD DSN=USERID.INCR.COPY,
// DISP=(MOD,CATLG),
// SPACE=(CYL,(50,50),RLSE),
// UNIT=SYSALLDA
//DSNUPROC.SYSIN DD *
COPY TABLESPACE DBNAME.TSNAME SHRLEVEL REFERENCE
FULL NO
Leaving the choice to DB2 to go for either FULL or
INCREMENTAL copy using CHANGELIMIT parameter:
//***********************************************************************
//* STEP DECIDES TO GO FOR FULL OR INCREMENTAL COPY BASED ON
//* THE PERCENTAGE OF DATA PAGES CHANGED IN THE TABLESPACE
//**********************************************************************
//IMAGE1 EXEC PGM=DSNUTILB,PARM=(DB2,'COPY01')
//STEPLIB DD DSN=SYS1.DSNDB2.SDSNLOAD,DISP=SHR
//SYSCOPY DD DUMMY
//DSNTRACE DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSIN DD *
COPY TABLESPACE DBNAME.TSNAME
CHANGELIMIT(50) REPORTONLY
/*
//***********************************************************************
//* BELOW INCREMENTAL COPY STEP WILL BE EXECUTED IF THE
//* PERCENTAGE OF CHANGED PAGES IS LESS THAN 50%
//**********************************************************************
//IMAGE2 EXEC PGM=DSNUTILB,PARM=(DSNS,'COPY02'),
// COND=(2,NE,IMAGE1)
//STEPLIB DD DSN=SYS1.DSNDSNS.SDSNLOAD,DISP=SHR
//SYSCOPY DD DSN=USERID.INCR.COPY
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(50,30),RLSE)
//DSNTRACE DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSIN DD *
COPY TABLESPACE DBNAME.TSNAME
FULL NO
/*
//***********************************************************************
//* BELOW FULL COPY STEP WILL BE EXECUTED IF THE PERCENTAGE
//* OF CHANGED PAGES IS GREATER THAN 50%
//**********************************************************************
//IMAGE3 EXEC PGM=DSNUTILB,PARM=(DB2,'COPY03'),
// COND=(3,NE,IMAGE1)
//STEPLIB DD DSN=SYS1.DSNDB2.SDSNLOAD,DISP=SHR
//SYSCOPY DD DSN=USERID.FULL.COPY
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(50,30),RLSE)
//DSNTRACE DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSIN DD *
COPY TABLESPACE DBNAME.TSNAME
FULL YES
/*
SAMPLE OUTPUT:output of the first step(IMAGE1) in the above job
=============================================================
DSNUGUTC - COPY TABLESPACE DBNAM.TSNAME CHANGELIMIT(5)
REPORTONLY
-DSNS DSNUBACH - IMAGE COPY INFORMATION
4KB CHANGED PERCENT OF
TSNAME DSNUM PAGES PAGES CHANGED PAGES ICTYPE
-------- ----- ------------- ------------- ------------- ------
ZSRIDHAR ALL 48 0 0.00 NONE
-DSNS DSNUBACH - NO CHANGE LIMIT MET FOR TABLESPACE DBNAME.TSNAME
DSNUGBAC - UTIL EXECUTION COMPLETE, HIGHEST RETURN CODE=1
DSNUGUTC - COPY TABLESPACE DBNAM.TSNAME CHANGELIMIT(5)
REPORTONLY
-DSNS DSNUBACH - IMAGE COPY INFORMATION
4KB CHANGED PERCENT OF
TSNAME DSNUM PAGES PAGES CHANGED PAGES ICTYPE
-------- ----- ------------- ------------- ------------- ------
ZSRIDHAR ALL 48 4 8.33 F
-DSNS DSNUBACH - FULL CHANGE LIMIT MET FOR TABLESPACE DBNAME.TSNAME
DSNUGBAC - UTIL EXECUTION COMPLETE, HIGHEST RETURN CODE=3
==================================================================
DSNUGUTC - COPY TABLESPACE DBNAM.TSNAME CHANGELIMIT(50)
REPORTONLY
-DSNS DSNUBACH - IMAGE COPY INFORMATION
4KB CHANGED PERCENT OFTSNAME DSNUM PAGES PAGES CHANGED PAGES ICTYPE
-------- ----- ------------- ------------- ------------- ------
ZSRIDHAR ALL 48 4 8.33 I
-DSNS DSNUBACH - INCREMENTAL CHANGE LIMIT MET FOR TABLESPACE DBNAME.TSNAME
DSNUGBAC - UTIL EXECUTION COMPLETE, HIGHEST RETURN CODE=2
No comments:
Post a Comment