look up failures

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
arnie_nits
Participant
Posts: 101
Joined: Mon Aug 13, 2007 2:32 am

look up failures

Post by arnie_nits »

Hi,

I am getting a very strange problem. All my source records are failing lookups. But when I try to fine the records in the lookup hash files they are present.
What might be the reason. Please help.

Regards,
Arnab.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you have a single key column or multiple keys? Please give one example of a key that fails. Note that keys "HELLO" and "HELLO " might look the same but are distinct.
arnie_nits
Participant
Posts: 101
Joined: Mon Aug 13, 2007 2:32 am

Post by arnie_nits »

2 keys columns...
customerid and country
customerid=3*3BARS*COKS
country=USA


I tried with only customerid ,even then it was failing.

I also tried with ereplace(customerid,'*',''),even that failed.

Regards,
Arnie.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

How did you create the hashed file - unless you created it within DataStage and used the same key columns in the same order your lookup will most likely not work.
arnie_nits
Participant
Posts: 101
Joined: Mon Aug 13, 2007 2:32 am

Post by arnie_nits »

Yes...I created the hash file.....it is reusable job...only this time it is failing....with new set of data......
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

HOW did you create the hashed file? Can you go to the admin tool or UVSH and do a "LIST DICT {HashedFileName}"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

99 times out of 99 it's because of untrimmed character data on one side of the lookup or the other. As Arnd noted with his "HELLO" example. Ensure the metadata when created and used matches exactly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In this case I think it is the multiple columns used for the key that is causing the issue, particularly if the file creation metadata and query metadata are not the same. But generally it is as Craig has stated, that unseen spaces cause fields that look the same to not match.
Post Reply