Order of rows in hashed 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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Order of rows in hashed file

Post by snassimr »

Hi !!!

If anyway to preserve order of rows in hashed file according the order they enter the hashed file ?

May be to use different type of hashed file ?

Thanks
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Order of rows in hashed file

Post by sachin1 »

i think you know that data in hash file is key to data mapping, so i think their can be no way to preserve order.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Short answer is 'no'. Longer answer involves including the record number as a data element and doing an SSELECT or 'sorted select' to bring them back out in the input order. Requires an account-based hashed file, from what I recall, however.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Long answer is also "no".
It's the hashing algorithm that governs on which page/group/frame any particular record resides.
As noted, the only way to get sorted data out is to sort those rows.
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