124 IBM System Storage DS6000 Series: Copy Services with IBM System z
Example 11-3 Create a backup copy using TSO FlashCopy commands
Part 1
//*********************************************************************
//* ESTABLISH FLASHCOPY RELATIONSHIP WITH NOCOPY *
//* SDEVN - SOURCE FLASHCOPY VOLUME *
//* TDEVN - TARGET FLASHCOPY VOLUME *
//*********************************************************************
//STEP1 EXEC PGM=IKJEFT01,REGION=256K
//SYSTSPRT DD SYSOUT=*
//SYSUADS DD DSN=SYS1.UADS,DISP=SHR
//SYSLBC DD DSN=SYS1.BRODCAST,DISP=SHR
//SYSTSIN DD *
FCESTABL SDEVN(X'3200') TDEVN(X'3400') MODE(NOCOPY)
FCQUERY DEVN(X'3200')
FCQUERY DEVN(X'3400')
/*
After the backup has been taken, remove the FlashCopy relationship if you don’t intend to
use it for other purposes. Thus, unnecessary writes can be avoided. See Example 11-4.
Example 11-4 Withdraw the FlashCopy relationship
Part 2
//*********************************************************************
//* WITHDRAW FLASHCOPY RELATIONSHIP *
//* SDEVN - SOURCE FLASHCOPY VOLUME *
//* TDEVN - TARGET FLASHCOPY VOLUME *
//*********************************************************************
//STEP1 EXEC PGM=IKJEFT01,REGION=256K
//SYSTSPRT DD SYSOUT=*
//SYSUADS DD DSN=SYS1.UADS,DISP=SHR
//SYSLBC DD DSN=SYS1.BRODCAST,DISP=SHR
//SYSTSIN DD *
FCWITHDR SDEVN(X'3200') TDEVN(X'3400')
FCQUERY DEVN(X'3200')
FCQUERY DEVN(X'3400')
/*
11.2.2 Incremental FlashCopy for backup purposes
To have the safety of a real physical copy without always copying the full volume is
something that can be achieved using the incremental FlashCopy. An initial full volume
FlashCopy is followed by subsequent incremental FlashCopies, which only copy the updates
that took place on the source volume. See Example 11-5 on page 125.