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

AIX - Primary index + length of AIX + 5 bytes. Why 5 Bytes?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Thu Feb 26, 2004 3:45 pm
Reply with quote

Hi,

While we are creating AIX we need to give record size as Primary index + length of AIX + 5 bytes? What is purpose of these five bytes and what the info it will stores in it
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Thu Feb 26, 2004 4:37 pm
Reply with quote

Hello krbabu,

For Alternate Indexes,

The RECORDSIZE refers not to the size of the base cluster record, but is computed based upon the size of the keys in both the base cluster and the alternate index and whether the keys are unique not nonunique.

If the keys are unique, the records in the alternate index are fixed length, and the length is the value computed as 5 bytes of control information the length of the alternate key the length of the primary key (for KSDS) or the length of an RBA (for ESDS), which is 4 bytes As for a fixed length KSDS, this length is specified for both the average and maximum value in the RECORDSIZE parameter.

If the keys are nonunique, the records in the alternate index will be variable in length

The average length is computed as:

Quote:

1) 5 bytes of control information
2) The length of the alternate key
3) The length of the primary key (for KSDS) or the length of an RBA (for ESDS), which is 4 bytes multiplied by the expected average number of nonunique keys



The maximum length is computed as:

Quote:

1) 5 bytes of control information
2) The length of the alternate key
3) The length of the primary key (for KSDS) or the length of an RBA (for ESDS), which is 4 bytes multiplied by the maximum number of nonunique keys.



The contents of the 5 bytes of control information stored in the alternate index record indicate the type of the base cluster the alternate index points to and the length of the keys:


Quote:

The first byte indicates the type of base cluster - x'01' indicates KSDS; x'00' indicates ESDS

The second byte indicates the length of the base cluster pointers in the alternate index record - x'primary key length' if the base cluster is KSDS or x'04' if the base cluster is ESDS

The third and fourth bytes are a halfword value indicating the number of occurrences of the base cluster pointers within the alternate index record; e.g. will contain x'0001' for a unique alternate key

The fifth byte indicates the length of the alternate key


Hope this helps,

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Fri Feb 27, 2004 10:14 am
Reply with quote

Thank you Mayuresh
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 Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts Inserting variable length into output... JCL & VSAM 2
No new posts SORT ERROR PARAMETER VALUE EXCEEDS M... DFSORT/ICETOOL 12
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts ICETOOL with JOINKEY for Big record l... DFSORT/ICETOOL 12
Search our Forums:

Back to Top