View previous topic :: View next topic
|
Author |
Message |
THINKSRINIII Warnings : 1 New User
Joined: 09 Jan 2009 Posts: 88 Location: India
|
|
|
|
Hi..
Could someone help me in getting the minimum length of CI for a...
1. Fixed length record
2. Variable length Record
3. One record per CI...
I presume for 1 & 2... 10 is the Min size.. Not sure about the 3..
Cheers |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
You presume wrong about 1 & 2 ... 10 is not the minimum size. Check the manual for details, or look up the Redbook VSAM Demystified and spend a while in it. And why would #3 be different from #1 or #2? |
|
Back to top |
|
|
THINKSRINIII Warnings : 1 New User
Joined: 09 Jan 2009 Posts: 88 Location: India
|
|
|
|
Hi Rob..
I had a look into the manual suggested by ofer and i had referred the Red book already.
For the First case of Fixed length records..
Lets say 2 records of Fixed length 160 Bytes are there..
So, In CI there will be a CIDF(4 Bytes) and 2 RDF(6 Bytes).
For the second Case:
Lets say 2 records of Variable length 160,100 Bytes are there..
So, In CI there will be a CIDF(4 Bytes) and 2 RDF(6 Bytes)again.
For third Case:
It contains only one record.. So one CIDF(4 Bytes) and a RDF(3 Bytes)
Please let me know if i go wrong somewhere...
Cheers |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
A CI contains the CIDFs, RDFs and the DATA.
For 2 160byte fixed length records you get 1 x CIDF (4bytes) + 2 x RDF ( 2 x 3bytes). + 160 bytes + 160bytes.
For 3 160byte fixed length records you get 1 x CIDF (4bytes) + 2 x RDF ( 2 x 3bytes). + 160 bytes + 160bytes + 160bytes.
For VB records you get 1 x CIDF + ((1 x RDF + record length) * #records)
Where 1 record per CI, you have 1 x CIDF + 1 x RDF + record length.
The minimum is determined by the record type AND record length.
Garry. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If you read the manual, you hopefully noted that VSAM controlintervals can only be allocated in units of 512 bytes from 512 to 8192, and 2048 bytes from 8192 to 32768. So the absolute minimum size you may allocate is 512 bytes. If you are allocating a KSDS file, the index CISIZE depends on the data CISIZE and the key length. |
|
Back to top |
|
|
THINKSRINIII Warnings : 1 New User
Joined: 09 Jan 2009 Posts: 88 Location: India
|
|
|
|
Hi Rob and Garry,
Thanks for your reply.. I am worried here about the Minimum bytes occupied by CIDF and RDF specifically which go as overhead every time for a fixed length records(More than one record per CI).., Variable length record(More than one record per CI)... and finally only one record is there in a CI..
The real need here is to think of what at most can be the Minimum Value?
Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I'm not sure why you're worried ... 10 bytes for fixed length records is at most 2% overhead; if you use 18432 CI SIZE then you're talking less than 0.1% overhead for fixed length records. And, perhaps more to the point, there's nothing you can do about it -- the bytes are going to be used, period. I've seen WAY more space wasted by bad freespace values, and bad index CI SIZE values, then the overhead that you cannot control. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
For fixed-length records there will be 1 x CIDF , 1 x RDF describing the fixed lengtyh and 1 x RDF specifying how many records. An absolute minimum byte usage would be 10+record length and would reflect a single record. This is where there is only one fixed-length record in the CI.
For variable-length records, there will be 1 x CIDF plus 1 x RDF for each record in the CI, giving a minimum for a single 160byte record of 7+record length. This applies also where there is only one variable-length record in the CI.
There will almost certainly be more RDFs used for variable-length records.
Garry. |
|
Back to top |
|
|
|