Is there any value in reorging a CA Librarian Master file if it is not full?

Document ID : KB000048148
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

No, there is no value in reorgs CA Librarian Master files unless there are a lot of dead blocks in the Master File.

Solution:

Reorging a CA Librarian Master files is not necessary as CA Librarian does its own space management.

However, if the Master file has a lot of dead blocks, the Master file can be reorged to reclaim the space.

To determine if there are any dead blocks on a Master file, run a Master File Statistical Summary report:


//STEP1        EXEC   PGM=AFOLIBR 
//MASTER       DD     DSN=YOUR.LIBRARIAN.MASTFILE,DISP=SHR
//OSJOB        DD     DUMMY
//LIST         DD     SYSOUT=*
//SYSPRINT     DD     SYSOUT=*
//SYSIN        DD     *                                           
-OPT INDEX(S)                                                 
-END                                                          
/*

Steps to reorg a BDAM or VSAM CA Librarian Master file:

  1. Allocate a new BDAM file with the same DCB attributes as the existing Master file. You can make the file larger but keep the DSORG as PS and use the same blocksize. For VSAM Master files, delete and define a VSAM Master file. Again it can be defined larger if necessary.
  2. Run a BKPDISK job to copy the current Master file to the newly allocated Master file:
    //STEP1        EXEC   PGM=AFOLIBR 
    //MASTER       DD     DSN=YOUR.LIBRARIAN.MASTFILE,DISP=SHR
    //BACKUP       DD     DSN=YOUR.LIBRARIAN.MASTFILE.NEW,DISP=SHR   
    //OSJOB        DD     DUMMY
    //INDEX        DD     SYSOUT=*
    //LIST         DD     SYSOUT=*
    //SYSPRINT     DD     SYSOUT=*
    //SYSIN        DD     *                                           
    -OPT BKUPDISK,INDEX                 <  For BDAM Master files 
    -OPT BKUPDISK,BLOCKS=nnnn           <  For VSAM Master files
    -END                                                          
    /*
    
    BLOCKS=nnnnn
    Specifies the number of VSAM records to initialize. If omitted, only the primary extent space allocation of the data set are initialized. To calculate the maximum number of blocks,  use the following equation:
               physrecs/track x number of tracks = Z
               Z + ( (primary space/second space) * Z * 117 = BLOCKS
     
    The value of primary and secondary space, the value of physrecs/track and number of tracks are obtained from the LISTCAT ENT(libr.vsam.master) ALL command.
  3. Rename the current Master file to retain it as a backup.
  4. Rename the new Master file to the original Master file name.
  5. Run another Master File Statistical Summary report to verify the Master file.

Wide Record Master files do not support BKUPDISK. You must use an external PDS utility, such as the IBM IEBCOPY.

  1. Allocate a new (and larger if necessary) PDS or PDS/E data set.
  2. Use IEBCOPY to copy the current Wide Record Master file to the new Master file
  3. Rename the current Master file to retain it as a backup.
  4. Rename the new Master file to the original Master file name.
  5. Run another Master File Statistical Summary report to verify the Master file.

Please see the CA Librarian System Services Reference Guide for more information about performing backups of CA Librarian Master files.