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
Order of rows in hashed file
Moderators: chulett, rschirm, roy
Re: Order of rows in hashed file
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.
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
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.