//CLEANIPL JOB (0),'CLEANUP IPLLOG',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1) //* =================================================================== //* Ad-Hoc Housekeeping maintenance Job //* Roll over the IPLs LOG file //* Triggered by: dataset percent full check job //* //* RAKF rules must allow full access to the dataset. I had issues //* with the rename with a security rule copy error, resolved by //* using the full old and new dataset names in the RAKF profile. //* =================================================================== //* //* ------------------------------------------------------------------- //* Purge any old file if it exists. //* If it does not exist no worries, set maxcc to 0 //* ------------------------------------------------------------------- //PURGEOLD EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DD1 DD UNIT=3380,VOL=SER=PUB002,DISP=SHR //SYSIN DD * DELETE MARK.IPLS.LOG.OLD NONVSAM FILE(DD1) SET MAXCC=0 /* //* ------------------------------------------------------------------- //* Rename the existing file to .old //* Note that using IEHPROGM to rename a dataset does not update //* the catalog entries for the dataset, so there has to be a manual //* uncatalog of the old dataset name and catalog of the new name. //* ------------------------------------------------------------------- //RENAME EXEC PGM=IEHPROGM,COND=(0,NE) //SYSPRINT DD SYSOUT=* //DD1 DD UNIT=3380,VOL=SER=PUB002,DISP=SHR //SYSIN DD * RENAME DSNAME=MARK.IPLS.LOG,VOL=3380=PUB002,NEWNAME=MARK.IPLS.LOG.OLD UNCATLG DSNAME=MARK.IPLS.LOG CATLG DSNAME=MARK.IPLS.LOG.OLD,VOL=3380=PUB002 /* //* ------------------------------------------------------------------- //* And create a new file. //* ------------------------------------------------------------------- //CREATE EXEC PGM=IEFBR14,COND=(0,NE) //DD1 DD UNIT=3380,VOL=SER=PUB002, // DISP=(NEW,CATLG,DELETE), // DCB=(DSORG=PS,RECFM=FB,LRECL=132,BLKSIZE=5280), // SPACE=(TRK,(5,0)), // DSN=MARK.IPLS.LOG //