Hash file not matching

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
MOHAMMAD.ISSAQ
Participant
Posts: 78
Joined: Fri Mar 02, 2007 4:54 am
Location: CHENNAI

Hash file not matching

Post 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..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post 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 :)
Share to Learn, and Learn to Share.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, now please help us out.

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

"You can never have too many knives" -- Logan Nine Fingers
MOHAMMAD.ISSAQ
Participant
Posts: 78
Joined: Fri Mar 02, 2007 4:54 am
Location: CHENNAI

Post 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..
Post Reply