//CPAHDBK JOB (Job Accounting)
//*
//CICSPA EXEC PGM=CPAMAIN,PARM='UPPER'
//STEPLIB DD DSN=CICSPA.V3R2M0.SCPALINK,DISP=SHR
//CPAHDBRG DD DSN=USER.CICSPA.HDB.REGISTER,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CICSPA HDB(HKEEP)
/*
//CPAHKDEL DD DSN=&CPAHKDEL,DISP=(NEW,PASS),
// UNIT=DASD,
// SPACE=(CYL,(1,1))
//*
//DELETE EXEC PGM=IDCAMS,COND=(0,NE,HKEEP)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&CPAHKDEL,DISP=(OLD,DELETE)
Note that the data sets are deleted by a second job step.
The IDCAMS utility is used to delete the data sets.