Previous Topic: Set up CCILGR/Assured DeliveryNext Topic: Activate Assured Delivery for CAICCI


REORG the VSAM File

REORG the VSAM file regularly as needed. A REORG reclaims CA/CI splits, maintains your data integrity, and sustains your 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.

Follow these steps:

  1. In the CAIENF CCIPARMx CAW0OPTN member, code the LOGGER statement to specify a REORG when CCILGR starts.
    LOGGER(020,012,012,Y)
    

    When Y is specified in the fourth position, the VSAM database is REORGed at CCILGR startup.

  2. Ensure that the CCILGR procedure has an SYSUT1 DD statement referencing the backup file.
    //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=*
          //*
          //*
    
  3. At a predetermined time, issue the following command (console or automation):
    P CCILGR
    

    This command stops CCILGR. The presence of the LOGGER statement causes CAIENF to restart CCILGR automatically. The Y parameter in the LOGGER statement causes the REORG to take place.

Important! Ensure that the SYSUT1 DD statement referencing a backup file is present in the CCILGR JCL. A successful REORG requires an SYSUT1 DD statement. This restriction applies even if Y is specified in the logger statement.