Page 1 of 1

Hash file not matching

Posted: Tue Feb 19, 2008 4:16 am
by MOHAMMAD.ISSAQ
I have one input file of only one coulmn say "single_column" around 30000 length.It has around 1000 rows each identified by a unique key.
I'm using a hash lookup file as a reference which contains the keys, it has around 400 rows.My job ran successfully but there are no rows coming from the hash file.So, my output file has zero rows.
I checked the data also, it's present in hash files but still it's not matching.

The key expression have given for lookup as
Hash.Key----->SeqFile.single_column[1285,10]
And i'm writing a constraint as Not(Hash.NOTFOUND) then pass the rows otherwise...

Please help me out..

Posted: Tue Feb 19, 2008 4:39 am
by ArndW
Try rewriting a test job from your original that outputs the KEY and the SeqFile.single_column[1285,10] as separate columns into a text file and find out why the lookup fails.

Posted: Tue Feb 19, 2008 4:44 am
by asitagrawal
While writing the Hashed file use TRIM function to remove any extra spaces from left and right.. atleast for the key fields.
While writing the Key Expression, use TRIM function in the same manner... so your key expression would be...

Code: Select all

TRIM(SeqFile.single_column[1285,10],'','B').
HTH :)

Posted: Tue Feb 19, 2008 7:29 am
by chulett
Ok, now please help us out.

What was the resolution here? Posting that brings closure to the topic and helps future searchers...

Posted: Tue Feb 19, 2008 8:29 am
by MOHAMMAD.ISSAQ
Sorry to all.

I found some unusual character at the end that's why the data is not matching.
I've used Trim for that.

Thanks for the help..