Lookup of the hashed file fails

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First, NOTFOUND should only be used for hashed file lookups. And lookups fail when there is no key match - it is an equi-join and the data must match exactly and that includes any spaces, trailing or otherwise.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Seyed
Participant
Posts: 74
Joined: Wed Apr 14, 2010 7:25 am
Location: Oklahoma City

Post by Seyed »

Hi Craig,
I appreciate your assistance. I checked the data in the key columns again and noticed that even though visually the key values between the driver table and lookup file (hashed file) were equal, but the values in the driver table were made of only 6 characters, and the same values in the hashed file consisted of 8 characters including 2 padded spaces. I modified the SQL code in the ODBC driver table to pad 2 spaces at end of each key column and now this problem is resolved and the lookup is successful. I even changed back the definition of the constraint to

Code: Select all

If VTBLUSER_lookup.NOTFOUND then 'X' else 'N'
Thanks as always,

Seyed
Post Reply