Hashed File Lookup

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
goriparthi
Charter Member
Charter Member
Posts: 57
Joined: Fri Feb 24, 2006 7:44 am

Hashed File Lookup

Post by goriparthi »

Hi,

I have a job where i use a hashed file for lookup which has only two coloumns one of them is char 10 field this is the key field and the same field is coming from the source which is also a char 10 field.

My problem is there are some records which it throws as reject but the data is there both in the source and hashed file

Reject meaning its unable to find a match so i assign a zero for that corresponding second field from the source whereas it has actually got a lookup record

NOTE : I did trim on both source and lookup

Can anyone suggest me something that i couldnt think of

THANKS
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't trim trailing spaces from a CHAR field. Make sure everything matches out to the full 10 characters on both sides of the lookup.
-craig

"You can never have too many knives" -- Logan Nine Fingers
goriparthi
Charter Member
Charter Member
Posts: 57
Joined: Fri Feb 24, 2006 7:44 am

Post by goriparthi »

Hi,

Ok ,but the examples i saw today is a full 10 digit alpha numerical field
example : 05183207AD same in the source and hashed file , ididnt understand this part , any reason why this can happen
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Typically this happens when you think they are identical when in fact they are not. You need to triple-check, very carefully. They would need to match exactly: case, length, character for character - the whole nine yards.

:idea: Length isn't enforced in Server until it hits a database, so just because you've said something is CHAR(10) doesn't mean there can't be more than 10 characters in your data midstream. Try substringing both sides rather than trimming:

Code: Select all

YourField[1,10]
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply