IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reg recordsize calculation in alternate index in VSAM files.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
J.P.R.Kumar

New User


Joined: 02 Apr 2008
Posts: 11
Location: Chennai

PostPosted: Thu Jun 26, 2008 10:15 am
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jun 26, 2008 2:00 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 26, 2008 5:20 pm
Reply with quote

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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Wed Jul 02, 2008 6:27 pm
Reply with quote

Will there be any problem if the alternate index record size is greater than the above said equation?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 02, 2008 6:32 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top