Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: AIX - Primary index + length of AIX + 5 bytes. Why 5 Bytes?
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: 238
Location: USA

PostPosted: Thu Feb 26, 2004 4:37 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us