The following example JCL performs two tasks:
//CCVXHKPU JOB your job statement information
//STEP EXEC PGM=CCVBHKP
//STEPLIB DD DISP=SHR,DSN=ccvhlq.SCCVAlang
// DD DISP=SHR,DSN=ccvhlq.SCCVAUTH
// DD DISP=SHR,DSN=cicshlq.SDFHEXCI
//CCVLOAD DD DSN=datahlq.JOURNAL.DATA
//CCVPRINT DD SYSOUT=*
//CCVWORK DD DSN=&WORK,
// DISP=(NEW,DELETE,DELETE),SPACE=(CYL,(10,1)),UNIT=SYSDA,
// DCB=(RECFM=VB,BLKSIZE=0,LRECL=8230,DSORG=PS)
//CCVUNLD DD DSN=datahlq.JOURNAL.DATA,
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(10,1)),UNIT=SYSDA,
// DCB=(RECFM=VB,BLKSIZE=0,LRECL=8230,DSORG=PS)
//CCVPARMS DD *
CONNECT IPADDRESS=ip_address,PORT=ip_port_number
UNLOAD KEEPINSTANCES=2
CRITERIASET COND=(CREATETIME LT TODAY-31)
/*
Similar JCL is supplied in the sample library SCCVSAMP member CCVXHKPU.
The following example JCL loads previously unloaded journal records that were created as a result of Migrate or Copy commands, where the resource definition affected by the command belongs to a CICSĀ® configuration whose name starts with the letters PROD.
//CCVXHKPL JOB your job statement information
//STEP EXEC PGM=CCVBHKP
//STEPLIB DD DISP=SHR,DSN=ccvhlq.SCCVAlang
// DD DISP=SHR,DSN=ccvhlq.SCCVAUTH
// DD DISP=SHR,DSN=cicshlq.SDFHEXCI
//CCVPRINT DD SYSOUT=*
//CCVLOAD DD DSN=datahlq.JOURNAL.DATA
//CCVPARMS DD *
CONNECT IPADDRESS=ip_address,PORT=ip_port_number
LOAD
CRITERIASET COND=(API_COMMAND=MIGRATE),
COND=(CONFIGURATION=PROD*)
CRITERIASET COND=(API_COMMAND=COPY),
COND=(CONFIGURATION=PROD*)
/*
Similar JCL is supplied in the sample library SCCVSAMP member CCVXHKPL.
The job control statements that are specific to the batch housekeeping program are:
Follow the CONNECT command with an UNLOAD or a LOAD command, and then, optionally, one or more CRITERIASET parameters. You must supply the CONNECT command, the UNLOAD or LOAD command, and each CRITERIASET condition on separate input lines in the JCL. Each CRITERIASET can contain one or more conditions specifying the journal records that you want to load or unload. You can specify the same types of condition for either LOAD or UNLOAD.
When unloading, you can choose to specify the number of instances of a resource definition you want to keep in the journal, regardless of the conditions specified by CRITERIASET. You can also choose to unload journal records without deleting them from the journal.