How to determine CI size by key length?
How to determine CI size by key length?
Hi,
Am not very familiar with VSAM so asking this. How to determine CI size by key length? If the file length 25 and the file length is 2000? Is it based on CA size?
Am not very familiar with VSAM so asking this. How to determine CI size by key length? If the file length 25 and the file length is 2000? Is it based on CA size?
Thanks,
Re: How to determine CI size by key length?
What does this mean? In general there are no 'files' on zOS but data sets. Data sets do not have a 'length' but records do. Try reading the VSAM Demystified red-book.file length
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: How to determine CI size by key length?
Are you talking about a KSDS? In general, key size has NO relationship to CI size. CI size can only be certain values (512 to 8192 by 512, 8192 to 32760 by 2048) and you select the CI size based on the data set (not file) record length -- if your records can be 20,000 bytes long then you would want a CI size of 20K, 22K, 24K, 26K, 28K, 30K, or 32760 so you don't have to have spanned records.
For a KSDS, the key length and data component CI size determine the minimum index component CI size you need -- the index CI size needs to be large enough to hold pointers to every CI in the data component CA. If the index CI size is not long enough, some of the data component CI cannot be accessed and hence your data set will require more space.
For a KSDS, the key length and data component CI size determine the minimum index component CI size you need -- the index CI size needs to be large enough to hold pointers to every CI in the data component CA. If the index CI size is not long enough, some of the data component CI cannot be accessed and hence your data set will require more space.
Re: How to determine CI size by key length?
Yes, I was talking about KSDS.
did you mean that there are case when there is a connection in between key-size and CI?In general, key size has NO relationship to CI size.
How did you bring in those numbers for CI? Is there some rule to know?CI size can only be certain values (512 to 8192 by 512, 8192 to 32760 by 2048) and you select the CI size based on the data set (not file) record length -- if your records can be 20,000 bytes long then you would want a CI size of 20K, 22K, 24K, 26K, 28K, 30K, or 32760 so you don't have to have spanned records.
Thanks,
Re: How to determine CI size by key length?
For 20,000 byte (~20k) record you would want a minimum of 20k so the increment is 2k so you get:CI size can only be certain values (512 to 8192 by 512, 8192 to 32760 by 2048)
Undestand?20K, 22K, 24K, 26K, 28K, 30K, or 32760
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: How to determine CI size by key length?
Let me restate myself: I am aware of no circumstances in which data component CI size can possibly be related to key length. Data component CI size should be selected based on record (not key) length, access characteristics (sequential versus random), online versus batch, and site standards. Index component CI size should be based upon key length, data component CI size, and site standards. Index component CI's contain keys and pointers to data component CI's, in a compressed format, so the key length plays a role. The rule of thumb (which may have been updated in the last few years - I haven't checked lately) was to take half the key length plus 4 bytes and multiply the sum by the number of data CI per CA, and then pick an index CI size which is larger than the result. Index component CI size is why I qualified my previous statement -- key length plays a role in determining the CI size for the index component.did you mean that there are case when there is a connection in between key-size and CI?
Many sites don't bother with the calculations and just pick 4096 for data component CI size and 1024 (or 4096) for index component CI size. These values usually work (except for odd KSDS datasets), but may be extremely inefficient.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: How to determine CI size by key length?
You might want to download and start reading http://www.redbooks.ibm.com/abstracts/s ... .html?Open which is the IBM Redbook VSAM Demystified -- an excellent learning tool for VSAM.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute