Dynamic Hash file (create file) properties

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
RShiva
Participant
Posts: 6
Joined: Tue Dec 27, 2005 3:54 am

Dynamic Hash file (create file) properties

Post by RShiva »

Apart from HFC is there any other alternateway to calculate the Hash file Properties for Type(30)Dynamic in create file options i.e Minimum modulus, selecting Hash algorithm using column length and display length
Shiva
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

When creating a new file the HFC is the only automated tool that will help you calculate these values. You can use the published information on Hashed files to manually calculate a ballpark figure. There are also the TCL commands HASH.AID and HASH.AID.DETAIL if I rememberc correctly - but they take existing data files and play through different configurations. Making a modulo too large doesn't impact performance, it just pre-reserves disk space; so erring on that side is not bad, only a modulo that is too small will give you bad performance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's also doing the arithmetic.

A hashed file is made up of a number of pages (groups) the size of which you decide (either 2KB or 4KB). You have a certain volume of data that you need to store; you also allow, say, 20% headroom. So, to store N bytes of data, you need (N + 20%) / (page_size) pages. That is a starting minimum modulus figure.

Be aware, however, that there is some storage overhead in hashed files; for k columns allow (14 + k) bytes per record if 32-bit addressing is in place or (22 + k) bytes per record if 64-bit addressing is in place.

Some additional complexity arises if there are likely to be oversized records that don't fit on pages (even HFC does not allow for these).
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