How do I use a TEMPLATE function during a Rapid Reorg job to create Dynamically allocated Quick Copy Image copy Datasets?

Document ID : KB000022107
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

When a Rapid Reorg job is executed, the ability to create an image copy during the job is provided via a call to CA QUICKCOPY for DB2 for Z/OS using the QUICKCOPY keyword. If dynamic allocation of the image copy dataset is required QUICKCOPY does this for you via the hlq.CDBAPARM(PQC) member which contains dataset mask templates for creating the required datasets. If the user does not wish to use the standard templates in hlq.CDBAPARM(PQC) there is a TEMPLATE function which can be used in the individual Rapid Reorg JCL that will override the hlq.CDBAPARM(PQC).

 

Answer:

To override the standard hlq.CDBAPARM(PQC) dynamic allocation parms using the TEMPLATE function change the JCL accordingly.

Add in a SYSTEMPL DD card. You can define a number of different named templates. In this case I have one for large size tablespaces(BIGTS) and one for small ones(SMALLTS). You can use various variables to make up the dataset pattern as can be done in Quickcopy.

 //SYSTEMPL DD *       
 TEMPLATE BIGTS 
         DSN HLQ.2LQ.B.&TS..P&PART..T&TIME.
         DISP (NEW,CATLG,CATLG)
         UNIT CART
         RETPD 15
         GDGLIMIT 10
         STACK YES
  TEMPLATE SMALLTS
         DSN HLQ.&DB..&SN..P&PA..SMALLTS
         DISP (NEW,CATLG,CATLG)
         UNIT DISK
         SPACE (10,10) CYL
         LIMIT(100 CYL, BIGTS)

In order to reference this structure in the Rapid Reorg parms the QUICKCOPY parm is used.

QUICKCOPY COPYnn (Y|N,[ddname|templatename],[exitname,][icbackup,][devtype])

In this case instead of referring to a ddname in the JCL I refer to one of the templatenames that I have set up. Quickcopy will recognise this as a template and not a ddname.

QUICKCOPY COPY01(Y,SMALLTS,,LP)

This will reference the SMALLTS Template in this case.

In the job output you will see something like this when this template is used.

 COPY DATA PROCESS STARTING
 COPY001 - FULL IMAGECOPY 
 DATASET: authid.database.tablespace.P00001.SMALLTS
 VOLUMES: SMS
 SYSCOPY UPDATE: ICTYPE=F STYPE= DSNUM=000 ICBACKUP=
 REAL TIME STATISTICS TABLES UPDATE COMPLETED
 COPY DATA PROCESS ENDING
 .
 .
 .
 PQC0260I DATASET ALLOCATED: DDNAME SYS00082 USING TEMPLATE SMALLTS
 DSN authid.database.tablespace.P00001.SMALLTS

Additional Information:

Documentation regarding the use of the QUICKCOPY parm and TEMPLATE functions can be found in the: 

CA Rapid Reorg for DB2 for Z/OS User Guide

CA Quickcopy for DB2 for Z/OS User Guide