REORG the VSAM file on a regular basis as needed. A REORG reclaims CA/CI splits, maintains data integrity, and sustains consistent performance. A REORG every 24 hours is recommended, and can be automated. No data is lost because it is written to a backup file first, then written back to the VSAM file when the REORG is complete.
To prepare CCILGR for a manual or automated REORG of the VSAM database
LOGGER(020,012,012,Y)
When Y is specified in the 4th position, the VSAM database is REORGed when CCILGR starts up.
//CCILGR PROC VSAM='CAI.AD.VSAM', /* ASSURED DEL RESPOSITORY */
// BACKUP='CAI.AD.BACKUP' /* ASSURED DEL BACKUP FILE */
//*
//*********************************************************************
//* *
//* BACKUP FILE IS USED TO REORG THE VSAM FILE IF SPECIFIED ON THE *
//* LOGGER STATEMENT IN CCIPARMS OR ENFPARMS AT START-UP. *
//* *
//* I.E. LOGGER(25,23,12,Y) *
//* *
//* THIS QSAM FILE SHOULD BE ALLOCATED 20%-25% LARGER THAN THE *
//* VSAM FILE. FOR EXAMPLE, IF THE CLUSTER HAS BEEN ALLOCATED *
//* WITH CYLINDERS(20,10) THEN THE BACKUP FILE SHOULD BE *
//* ALLOCATED WITH SPACE=(CYL,(25,10),RLSE). *
//* *
//* FOR EXAMPLE, AS A TEMP DATASET: *
//* *
//* //SYSUT1 DD SPACE=(CYL,(25,10),RLSE), *
//* // UNIT=SYSDA, *
//* // DSN=&&TEMP, *
//* // DISP=(,PASS) *
//* *
//* *
//* AS A PRE-ALLOCATED DATASET: *
//* *
//* //BR14 EXEC PGM=IEFBR14 *
//* //ALLOC DD DSN=CAI.AD.BACKUP, *
//* // DISP=(NEW,CATLG,DELETE), *
//* // DCB=(RECFM=U,BLKSIZE=32760), *
//* // SPACE=(CYL,(25,10),RLSE) *
//* *
//* * //*********************************************************************
//*
//CCILGR EXEC PGM=CASNMLGR,TIME=1440,REGION=40M
//*
//STEPLIB DD DSN=CAI.CAILIB,DISP=SHR
//CAICCIAD DD DSN=&VSAM,DISP=SHR
//*
//SYSUT1 DD DSN=&BACKUP,DISP=OLD
//SYSPRINT DD SYSOUT=*
//*
//*
P CCILGR
This command stops CCILGR. The presence of the LOGGER statement causes CAIENF to automatically restart CCILGR. The Y parameter in the LOGGER statement causes the REORG to take place.
Important! Insure the SYSUT1 DD statement referencing a backup file is present in the CCILGR JCL. If there is no SYSUT1 DD statement, the REORG will not take place even if Y is specified in the logger statement.
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |