Data set allocation for replication logs

You should allocate a large data set for replication logs before you start a Q Capture or Q Apply program on z/OS®.

If a replication program determines that its log data set is full, it writes the next message at the beginning of the log data set (wraps the log data set), which might be undesirable in your environment.

Allocate the initial log data set so that it is large enough to hold the messages that the replication program writes to the log data set between recycles, for example using attributes such as the following:

SPACE=(CYL,(20,5)), DCB=(RECFM=VB,LRECL=1028,BLKSIZE=6144)

Some replication users modify the PROC that starts the replication program to add a STEP to copy the log to a generation data set so that they can save a copy of their log. You can add the COPY STEP either before or after the STEP that executes the replication program.

If you do not need to keep older log entries, you can either specify LOGREUSE=Y when you run the replication programs, or add a STEP that clears the log to the PROC that starts the replication program.

The following example uses a generation data set for the Q Capture program:

//QCAP     EXEC PGM=ASNQCAP,
//PARM='CAPTURE_SERVER=DSNA capture_schema=CPSCHEMA startmode=warmsi'
//STEPLIB  DD DSN=ASNQ!!0.SASNLOAD,DISP=SHR
//         DD DSN=MQS!!0.SCSQANLE,DISP=SHR
//         DD DSN=MQS!!0.SCSQAUTH,DISP=SHR
//         DD DSN=DSN!!0.SDSNLOAD,DISP=SHR
//*        DD DSN=MQS!!0.SCSQLOAD,DISP=SHR
//*        DD DSN=XML!!0.SIXMMOD1,DISP=SHR
//*        DD DSN=SYS!!0.SCEERUN,DISP=SHR
//*        DD DSN=SYS!!0.SCLBDLL,DISP=SHR
//*MYENV   DD DSN=USER01.MYENV,DISP=SHR
//*TRCIN   DD  DISP=SHR,DSN=USRT001.PARMLIB(TRCIN),
//*        VOL=SER=DRRSH1,UNIT=SYSDA
//CAPSPILL DD  DSN=&&CAPSPL,DISP=(NEW,DELETE,DELETE),
//         UNIT=VIO,SPACE=(CYL,(50,70)),
//         DCB=(RECFM=VB,BLKSIZE=6404)
//MSGS     DD PATH='/usr/lpp/db2repl_10_01/msg/En_US/db2asn.cat'
//CEEDUMP  DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//*SYSIN   DD *
//SYSUDUMP DD  DUMMY
//*
//********************************************************************
//* COPY THE LOG DATA SET TO GDG BACKUP
//********************************************************************
//COPYLOG EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=CPUSER.DSNA.CPSCHEMA.QCAP.LOG,
//            DISP=SHR
//SYSUT2   DD DSN=CPUSER.DSNA.CPSCHEMA.QCAP.LOG.BKUP(+1),
//            DISP=(,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(100,100),RLSE)
//SYSOUT   DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUDUMP DD SYSOUT=*
//********************************************************************
//* CLEAR LOG DATA SET
//********************************************************************
//CLEARLOG EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DUMMY
//SYSUT2   DD DSN=CPUSER.DSNA.CPSCHEMA.QCAP.LOG,
//            DISP=SHR
//SYSOUT   DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUDUMP DD SYSOUT=*
//********************************************************************