View previous topic :: :: View next topic

Author 
Message 
dates
New User
Joined: 11 Mar 2008 Posts: 9 Location: LA,USA




Hi,
I have a KSDS file of Key length 31 from OFFSET 0 and AIX of key length 10 from OFFSET 13.
So my KSDS primary key layout is
01 ARECORD.
03 AKEY1.
05 A1 PIC X(1).
05 A2 PIC X(1).
05 A3 PIC X(10).
05 A4 PIC X(1).
05 AKEY2.
07 A5 PIC X(7).
07 A6 PIC X(3).
05 A7 PIC 9(8).
I have defined the KSDS file , but encountering problems in defining the AIX. What would be the record Size of AIX? 

Back to top 




expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8593 Location: Back in jolly old England




What happened to your access to the IDCAMS manual ??? or google perhaps ???
Quote: 
RECORDSIZE(average maximum 4086 32600)
The average and maximum length, in bytes, of an alternate index record.
An alternate index record can span control intervals, so RECORDSIZE can be larger than CONTROLINTERVALSIZE. The formula for the maximum record size of spanned records as calculated by VSAM is:
MAXLRECL = CI/CA * (CISZ  10)
where:
MAXLRECL is the maximum spanned record size
CI/CA represents the number of control intervals per control area
CA is the number of control areas
CISZ is the quantity control interval size
You can use either of the following formulas to determine the size of the alternate index record:
When the alternate index supports a keysequenced base cluster, use this formula:
RECSZ = 5 + AIXKL + (n x BCKL)
When the alternate index supports an entrysequenced base cluster, use this formula:
RECSZ = 5 + AIXKL + (n x 4)
Variables in the formulas represent these values:
RECSZ is the average record size.
AIXKL is the alternatekey length (see the KEYS parameter).
BCKL is the base cluster's primekey length. (You can enter the LISTCAT command to determine this base cluster's primekey length).
n = 1 when UNIQUEKEY is specified (RECSZ is also the maximum record size).
n = the number of data records in the base cluster that contain the same alternatekey value, when NONUNIQUEKEY is specified.
When you use NONUNIQUEKEY, give a record size large enough to allow for as many key pointers or RBA pointers as you might need. The record length values apply only to the alternate index's data component.
Restriction: REPRO and EXPORT do not support data sets with record sizes greater than 32760.



Back to top 


Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 7936 Location: Bellevue, IA




When defining an alternate index to a VSAM file, you must know whether or not the alternate index key is unique. If it is unique, the alternate index record size formula as quoted by expat reduces to 5 + primary key length + alternate index key length. If it is not unique, you must determine how many duplicates may occur  either by knowing or by guessing  and plug that number into the formula quoted by expat. In all cases, however, the alternate index record size has nothing to do with your base cluster record size. 

Back to top 



