Example 7: Multitasking copies using advanced techniques
//ACPEX07 JOB (PACP),'EXAMPLE 7',CLASS=Q,MSGCLASS=X,NOTIFY=&SYSUID
//**********************************************************************
//* Make a SHRLEVEL CHANGE full copy of all spaces in databases
//* ACPEXDB* using MAXTASKS (3,3). Table space ACPEXDB2.SAMP5TS is
//* copied by partition, with parts 1 & 3 being copied by task 1,
//* and parts 2 & 4 being copied by task 2. All other spaces
//* are copied by task 3.
//*
//* This job will create a local-site primary (LP) copy on DASD,
//* and a recovery-site primary (RP) copy that is stacked on tape.
//* Note that each task will allocate a tape drive.
//*
//* This example demonstrates the following features of COPY PLUS:
//*
//* - Restart parm NEW/RESTART to allow the job to be restarted by
//* re-submitting the job without changes.
//* - MAXTASKS (3,3) to use 3 tasks for making copies.
//* GROUP YES is not coded in this example but
//* it is implied by the presence of
//* multiple TABLESPACE specifications within the COPY command.
//* - Dynamic allocation with the OUTPUT command. Note that
//* MAXPRIM on the OUTPUT statement for LOCALP will limit the
//* primary and secondary extent size to 200 cylinders.
//* UNITCNT 5 will allow the image copy data set to span 5 volumes.
//* - Dynamic GDG base creation with the ACPGDG DD statement. In this
//* example, if the GDG base does not exist, one will be created
//* with a limit of 3.
//* - RESETMOD NO to avoid the overhead of clearing the modified-page
//* indicators in each spacemap.
//* - RUNSTATS YES BMCSTATS YES to collect RUNSTATS statistics and
//* DASD Manager statistics during the copy
//*
//**********************************************************************
//BMCCOPY EXEC PGM=ACPMAIN,REGION=0M,
// PARM='DGA,ACPEX07,NEW/RESTART,MSGLEVEL(1)'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//ACPGDG DD *
DEFINE GDG (NAME(&BASE) LIMIT(3) SCR)
//ACPERROR DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTIONS MAXTASKS (3,3)
OUTPUT LOCALP UNIT SYSDA
MAXPRIM 200 CYL UNITCNT 5
DSNAME ACP.LP.&DB.&TS.F&LPART(+1)
OUTPUT REMOTP UNIT CART STACK YES
DSNAME ACP.RP.&DB.&TS.F&LPART(+1)
COPY TABLESPACE ACPEXDB2.SAMP5TS DSNUM 1 TASK 1
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 3 TASK 1
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 2 TASK 2
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 4 TASK 2
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB*.* TASK 3
EXCLUDE ACPEXDB2.SAMP5TS
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
RESETMOD NO
SHRLEVEL CHANGE
RUNSTATS YES BMCSTATS YES
/*
//**********************************************************************
//* Make a SHRLEVEL CHANGE full copy of all spaces in databases
//* ACPEXDB* using MAXTASKS (3,3). Table space ACPEXDB2.SAMP5TS is
//* copied by partition, with parts 1 & 3 being copied by task 1,
//* and parts 2 & 4 being copied by task 2. All other spaces
//* are copied by task 3.
//*
//* This job will create a local-site primary (LP) copy on DASD,
//* and a recovery-site primary (RP) copy that is stacked on tape.
//* Note that each task will allocate a tape drive.
//*
//* This example demonstrates the following features of COPY PLUS:
//*
//* - Restart parm NEW/RESTART to allow the job to be restarted by
//* re-submitting the job without changes.
//* - MAXTASKS (3,3) to use 3 tasks for making copies.
//* GROUP YES is not coded in this example but
//* it is implied by the presence of
//* multiple TABLESPACE specifications within the COPY command.
//* - Dynamic allocation with the OUTPUT command. Note that
//* MAXPRIM on the OUTPUT statement for LOCALP will limit the
//* primary and secondary extent size to 200 cylinders.
//* UNITCNT 5 will allow the image copy data set to span 5 volumes.
//* - Dynamic GDG base creation with the ACPGDG DD statement. In this
//* example, if the GDG base does not exist, one will be created
//* with a limit of 3.
//* - RESETMOD NO to avoid the overhead of clearing the modified-page
//* indicators in each spacemap.
//* - RUNSTATS YES BMCSTATS YES to collect RUNSTATS statistics and
//* DASD Manager statistics during the copy
//*
//**********************************************************************
//BMCCOPY EXEC PGM=ACPMAIN,REGION=0M,
// PARM='DGA,ACPEX07,NEW/RESTART,MSGLEVEL(1)'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//ACPGDG DD *
DEFINE GDG (NAME(&BASE) LIMIT(3) SCR)
//ACPERROR DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTIONS MAXTASKS (3,3)
OUTPUT LOCALP UNIT SYSDA
MAXPRIM 200 CYL UNITCNT 5
DSNAME ACP.LP.&DB.&TS.F&LPART(+1)
OUTPUT REMOTP UNIT CART STACK YES
DSNAME ACP.RP.&DB.&TS.F&LPART(+1)
COPY TABLESPACE ACPEXDB2.SAMP5TS DSNUM 1 TASK 1
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 3 TASK 1
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 2 TASK 2
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB2.SAMP5TS DSNUM 4 TASK 2
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
TABLESPACE ACPEXDB*.* TASK 3
EXCLUDE ACPEXDB2.SAMP5TS
COPYDDN(LOCALP)
RECOVERYDDN(REMOTP)
RESETMOD NO
SHRLEVEL CHANGE
RUNSTATS YES BMCSTATS YES
/*
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*