Tips and Techniques for Managing Endevor ELIBs
search cancel

Tips and Techniques for Managing Endevor ELIBs

book

Article ID: 9558

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Endevor ELIBs need to be monitored on a regular basis. They need to be compressed to reduce extents and re-organized to resolve fragmented members.

Environment

Release: All
Component: ENDBAS

Resolution

1 - Control the status of ELIBs:

Every week run the BC1PNLIB utility using the INQUIRE function with the ANALYZE option. The following key fields in this report should be reviewed and compared:

  AVG ALLOC/MEMBER - Average number of pages taken up by one member
# DIRECTORY PAGES - Number of directory pages currently in the data set
# DIR OVERFLOWS - Number of times the directory has expanded
# LIBRARY EXTENDS - Number of times the data set has expanded
TOTAL MEMBERS FOUND - Total members found on all directory pages
FRAGMENTED - Number of fragmented members

 

Review the # DIRECTORY PAGES, # DIR OVERFLOWS and TOTAL MEMBERS FOUND.
If the # DIRECTORY PAGES is greater than the number in the DIRECTORY TARGET PAGES field, consider increasing the number of target directory pages.
If the # DIR OVERFLOWS is greater than 0, consider using the "DIRECTORY REORG" function of the BC1PNLIB utility to specify again the number of pages allocated to the directory. The standard rule of thumb is TOTAL MEMBERS/24 = Directory pages.

To keep the file at peak efficiency, the # LIBRARY EXTENDS, or the number of times the file has expanded, should be kept to a minimum.

Assuming there are no problems with directory overflows or library extends, how often should the file be reorganized to clean up fragmented members?

When the ratio of fragmented members to total members is greater than the desired percentage (for example, 30 to 50%) run the BC1PNCPY utility to reorganize the file.

Note: IDCAMS REPRO cannot be used to reorganize ELIB files, because it simply returns the data back to its original fragmented state.

The BC1PNCPY utility is the only way to make fragmented members whole again.

In either situation, allocate a new ELIB file with a primary space allocation large enough to hold the current file plus 25 to 50% for growth.
Use the BC1PNLIB utility's INIT function to initialize the new file, calculating the number of pages using the documented formulas (both the primary and the secondary entries can be up to six numeric characters) .
Then use BC1PNCPY to copy from the old file to the new file, and the IDCAMS ALTER command to rename the files accordingly.

Note: When dealing with large VSAM ELIBs that are in multiple physical extents, BC1PNCPY can take a long time to run.
Although IDCAMS repro use is discouraged as the permanent resolution to a fragmented file it can be used as an intermediate step to speed up the BC1PNCPY process, by reducing the number of physical extents.


2 - Reorganize ELIBs when necessary:

So following the advice given in point 1, look at the situation that matches your case and follows one of the 2 processes below:

2.1 - If the ELIB spans several volumes (which can't be reduced to a single volume):
 a - Allocate 2 new ELIBs VSAM, ensuring both are large enough to fit the existing file into a single extent.
 b - Run BC1PNLIB to INIT one of the VSAM file.
 c - Run IDCAMS to REPRO the fragmented ELIB to the second un-initialized VSAM file,
 d - Run BC1PNCPY to copy the second VSAM ELIB file to the VSAM ELIB initialized in step b.

Note: Even this solution works also for ELIBs that spans on a single volume, we recommend to use the solution 2.2 for any ELIB containing a large number of members.
Remark: Please make sure to allocate files with the same page size

2.2 - If the ELIB spans on a single volume only can use this process that use both VSAM and BDAM format:
 a - Rename the VSAM ELIB to .OLD, in order to isolate it from unwanted updates. 
 b - Create two BDAM datasets, BDAM1 and BDAM2. Both require to have the same space than the VSAM ELIB. 
 c - Run IDAMS repro from the VSAM ELIB to BDAM1.
 d - Run an ELIB initialise for BDAM2
 e - Run BC1PNCPY from BDAM1 to BDAM2
 f - Run IDCAMS DEFINE for new VSAM ELIB
 g - Run IDCAMS REPRO from BDAM2 to new VSAM

 Sample JCL for BDAM file creation:

//DD1      DD DISP=(NEW,CATLG),

//            UNIT=SYSDA,SPACE=(CYL,(2700,)),                 
//            DCB=(DSORG=DA,BLKSIZE=4088,LRECL=4088,RECFM=FBS),
//            DSN=aaaaaa.ENDEVOR.PROD.xxxx.DELTA.BDAM1 

Note: BDAM ELIB must be allocated on a single volume. 
Remark: Please make sure to allocate files with the same page size, if 4088, then LRECL for BDAM is 4088.

3 - Define which format of ELIB is best?

Studies have shown BDAM ELIBs to be more efficient and provide better performance than VSAM ELIBs.
However, IBM does not allow BDAM files to span volumes.
Therefore, if the file(s) can be kept to a single volume, use BDAM, otherwise use VSAM for multi-volume files.

Additional Information

For further information regarding ELIBs and the related utilities please refer to: EndevorĀ® 18.1 > Administrating > Setting Up ELIB Data Sets