New Index CI size calculation algorithm - VSAM

New Index CI size calculation algorithm
Use your automation console function to detect the message in Figure below, generating an alert.

Message due to index CI size too small

Message due to index CI size too small

After that, carefully read this topic.

VSAM uses a default minimum value for index CI size, if it determines that the one specified by you is not large enough. The algorithm that calculates this value was changed in z/OS V1 R3.

This change was to increase the likelihood that the index CI would be large enough to hold all the keys that can exist in a data CA. In a number of situations the default value calculated was not large enough. Because of this, there was a lot of space wasted in the VSAM data set that cannot be used. Also, this forced unnecessary increase in index levels and impacted the performance.

As you know, VSAM compresses the key value when stored the key in the index record. The previous algorithm for determining the minimum size always assumed that all data keys compressed to 5 bytes; in reality they were often much larger. The new algorithm assumes a 3:1 compression of the keys, for example that 45-byte keys compress to 15 bytes in the index record. So the newly computed CI sizes will be higher.

This change does not bring impact on existing data sets. But the new default value is used for any new VSAM data set created under z/OS 1.3 or higher. This also applies to any data sets created because of backup-restore or migrate-recall operations.

The main implication of this change is for applications that open data sets in LSR mode. VSAM data sets opened in LSR mode, might fail with IEC161I 120-053, if the buffer pool created by BLDVRP macro is not large enough to contain the increased CI sizes.

CICS and IMS open VSAM data sets in LSR mode. You may need to review LSRPOOL definition for CICS and DFSVSAMP definition for IMS. Both CICS and IMS use these definitions to determine the size of the buffer pool to be created by BLDVRP. This could lead to database open failures or poor performance.

If you are using VSAM RLS, there is not such issue because in RLS, SMSVSAM builds it's own pools for data sets.

If you are letting CICS calculate the number of buffers in your LSR buffer pools, then you should have no problem. If you are explicitly coding the number of buffers of each size in the LSRPOOL then you should review the number of buffers you specify.

Analyze existing data sets
You need to analyze your VSAM data sets and compare the current index CI size with the new value computed by z/OS V1 R3. We recommend you specify CI sizes for both index and data components of your VSAM data sets and compute the new value for the index CI size. If you do not do it, the index CI size of your VSAM data sets will change to the new value when they get redefined.

Sample program to identify LSR mode data sets
You need to identify all applications that open VSAM data sets in LSR mode and review the possibility of change in index CI size. To identify data sets opened in LSR mode, you can use the SMF 62 and 64 records. The fields SMF62MC3 and SMF64MC3 hold a one byte value. If the byte is in the format B'x1xxxxxx' then this indicates the data set was opened or closed in LSR mode. These records also include the data set name and jobname.

IBM CI sizer tool
IBM provides a tool to analyze your existing VSAM data sets. This tool gives a report showing:

  • Data set name
  • Current index CI size
  • Minimum (default) index CI size
  • Data CI size
  • Data set creation date

See Figure below for a sample output of this tool.

Sample output of the CISIZE tool

Sample output of the CISIZE tool

The tool name is INDXCISZ and can be downloaded to your MVS system from IBM FTP site as follows:

  • Allocate a data set with LRECL=1024,BLKSIZE=6144,RECFM=FB, DSORG=PS and RECFM=FB.
  • Enter the TSO ftp command.
  • At the Connect to? prompt, enter:
  • At the NAME prompt, enter: anonymous
  • At the PASSWORD prompt, enter your e-mail address.
  • At the Command prompt, enter: cd s390/mvs/tools
  • At the Command prompt, enter: binary
  • At the Command prompt, enter: get INDXCISZ.JCL.TRSD 'your data set’
  • Once the file is placed on your MVS system, you need to unterse it.
  • You need to use TRSMAIN program to unterse the file.

You can also download it using a batch job. For a sample job to download the tool and unterse it, see below.

Job to download the CISIZE tool

Job to download the CISIZE tool

The untersed file contains instructions for link editing and executing the tool. It will tell you the current CI size and recommended CI size for your selected VSAM data sets.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

VSAM Topics