Row size in a Hash file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pajj
Participant
Posts: 11
Joined: Fri Jun 16, 2006 12:27 pm

Row size in a Hash file

Post by pajj »

Where can I find documentation to help me determine the different data types size allocations in a Has file. For example I have a hash file with the following row structure:

field1 decimal 10
field 2 varchar 2
field 3 numeric 4

I need to find a document that will help me determine how much space each row will consume in bytes.

tks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I doubt there is a document for this manipulation per se, but you can make an educated guess. Add all the lengths up and add a few bytes to it. Ray has that info posted here somewhere. This will give you a good estimate of your row size.
I also advise searching the archives, on keywords like "calculate row size" and its alike.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are no data types - everything is stored as string. Add together the lengths, add one byte per field (the inter-field delimiter) then add fourteen bytes per record storage overhead (or twenty-two bytes per record storage overhead for 64-bit hashed files). In your example, that would be 16 + 2 + 14 = 32 bytes per record.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply