122 IBM System Storage DS6000 Series: Copy Services with IBM System z
11.1 Create a test system or integration system
Test systems or integration systems are needed to perform application tests or system
integration tests.
As it is assumed that with test systems or integration systems many write operations will
occur over the time period involved, we recommend doing a copy in the background
environment.
11.1.1 One-time test system
Assume there is an application using one volume, and a test system needs to be created to
allow application tests or integration tests based on the contents of the production data. A
FlashCopy is set up to copy the data once. See Example 11-1.
The application typically needs to be quiesced or briefly suspended before executing the
FlashCopy. Also, some applications cache their data, so this data may need to be flushed to
disk, using application methods, prior to running the FlashCopy; this is not covered in our
example.
Example 11-1 Create a one-time test system using TSO FlashCopy commands
//*********************************************************************
//* ESTABLISH 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 *
FCESTABL SDEVN(X'3200') TDEVN(X'3400') MODE(COPY)
FCQUERY DEVN(X'3200')
FCQUERY DEVN(X'3400')
/*
11.1.2 Multiple setup of a test system with same contents
Assume that an application test is needed multiple times with the same setup of data. The
production volume is 3200, the test volume is 3400. Volume 3201 is chosen as an
intermediate volume that gets its data once, copying it from the production volume using
FlashCopy. Then it is used as base for refresh of the test volume 3400.
Running Part 1 and Part 2 (see Example 11-2 on page 123) as one job would not work. The
job would fail, as volume 3201 could not be the target for one FlashCopy relationship and the
source for another FlashCopy relationship at the same time. You must wait until the
background copy for 3200 and 3201 finishes successfully before starting Part 2.