HashFileLookup

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
sridharvg
Participant
Posts: 17
Joined: Wed Jul 19, 2006 3:19 am
Location: Hyderabad, India
Contact:

HashFileLookup

Post by sridharvg »

Hi,

I would like to use the UtilityHashLookup for comparing the source value with the value coming from the Hashfile, but getting errors.
The code I modified is :
Locate HashTable in FilesOpened Setting POS Then
If Hashkey >=(Read Rec From FileHandles(POS), HashKey) Then
Ans = 'True'
End Else
Ans = DSRMessage("DSTAGE_TRX_I_0010" , "**RECORD NOT FOUND**", "" )
End
End Else
Requirement example: If the value coming from source is 6 and the lookup value is 5 in Hashfile, then I should get Ans='True'.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not possible using a Hashed File stage or UtilityHashLookup(). These only do exact match, employing the hashing algorithm to do so in the most speedy fashion available.

What you seek to do is possible, but slow, using a UniVerse stage or BCI code (with no licensing issues) to refer to the hashed file. You may need to create a VOC pointer to the hashed file, if the hashed file was created in a directory.
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