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
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

Hash File ?

Post by marc_brown98 »

I have a job that is using 2 hash files and 1 sequential. It basically reads the 2 hash files for lookup purposes and then inserts a field from each in addition to the output of the seq. file. For the life of me I cannot get 1 of the hash files to score any hits, even though I know it has a key match on the seq. file. Has anybody seen this or have I just been staring at a dumb mistake too long? :?
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I would check your metadata on the job that built the hash file and compare it to the job reading from it. Also check to see if your keys have been trimmed. You may have spaces on the keys and not know it. Just a couple of ideas to get you started back.
Mamu Kim
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

Post by marc_brown98 »

Thanks Kim, I will check all of those things out. It has to be something like what you said. I changed the job to use the db table that the hash file is built off of and it works fine.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are the data types of the key columns? What are the data types of the input columns you are using as reference key expressions? These must match.

The best approach is to make them all VarChar, Trim the key when loading the hashed file, and Trim the columns making up the reference key expression.

It's safe to make them all VarChar. The only data type in a text file is "text", and the only data type in a hashed file is "none".
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