|
|
| Author |
Message |
J.P.R.Kumar
New User
Joined: 02 Apr 2008 Posts: 9 Location: Chennai
|
|
|
|
AIX for a KSDS RECSZ = 5 + AIXKL + (n x BCKL)
AIX for ESDS RECSZ = 5 + AIXKL + (n x 4)
Where:
AIXKL is the alternate-key length
BCKL is the base cluster's prime-key length
n = 1 when UNIQUEKEY is specified
n = the number of data records in the base cluster that contain the same alternate-key value, when NONUNIQUEKEY is specified.
Can anyone explain how the above formula is arrived in calculation of AIX?? |
|
| Back to top |
|
 |
References
|
Posted: Thu Jun 26, 2008 10:15 am Post subject: Re: Reg recordsize calculation in alternate index in VSAM files. |
 |
|
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 125 Location: Dublin, Ireland
|
|
|
|
Hi,
I believe the 5 bytes consists of the CIDF(3) and RDF(2) which account for the usage of the CI. The CIDF is the Control Interval Descriptor Field and the RDF is the Record Descriptor Field. There is only one RDF as the AIX records are fixed-length.
The records in the CI then comprise the alternate-key and base-key (multilpes where NONUNIQUEKEY).
Hope this helps,
Garry. |
|
| Back to top |
|
 |
Robert Sample
Active User
Joined: 06 Jun 2008 Posts: 292 Location: Atlanta, GA
|
|
|
|
An AIX, unlike the primary key, has a length NOT related to the record length. An alternate index consists of the alternate key plus the primary key for each record that has a match on the AIX field. If you expect the AIX key field to match 25 primary key records you'd set the AIX as 5 plus alternate key length plus 25 times the primary key length. IF UNIQUEKEY is specified, the AIX record size is fixed. If NONUNIQUEKEY is specified, the AIX record size varies based on the number of primary key matches (default if not specified is 4086 average, 32600 maximum). The maximum record size that can be specified is 32767 * base key length + AIX key length + 5 -- and yes that can be over 32K; I've run 250K AIX sizes before.
For ESDS the RBA is used instead of primary key length which is where the value of 4 comes from. |
|
| Back to top |
|
 |
jithumohan
New User
Joined: 31 Jan 2008 Posts: 17 Location: Cochin
|
|
|
|
| Will there be any problem if the alternate index record size is greater than the above said equation? |
|
| Back to top |
|
 |
Robert Sample
Active User
Joined: 06 Jun 2008 Posts: 292 Location: Atlanta, GA
|
|
|
|
| I assume you mean the O/P equation. Making the AIX record size larger merely allows more primary keys (when NONUNIQUEKEY is specified) or overallocates space (when UNIQUEKEY is specified); unless you're real short on disk space there's no impact of making the AIX record size larger than required. |
|
| Back to top |
|
 |
|
|