Lookup getting zero matches

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
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Lookup getting zero matches

Post by johm73 »

I've created a hash file lookup with 2 columns. Key column holds values like: 'Q13A'

My input file has values the same as above. example: 'Q13A'

I've open both files and manually verified there are matches values within both files.

However, when the job runs I get zero matches?! No errors, just nothing joins on the lookup.

Any ideas or help from anyone?

Thanks!
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

Use trim ..may be there is a blank space
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

Thanks! but I Trim() both side and get the same result. both fields are varchar(10).

:(
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

how did you put your condition..
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

not sure what you mean by that...

When I created the lookup hash file I Trim() the value in a transformer.

I then Trim() the key expression in the transformer that I'm using the lookup in.

Does that answer the question?
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

Do you have any constraints?
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

no constraints...transformer looks like normal lookup..something like this:


[b]Input File[/b]
respid
question [b]Lookup[/b]
bp_file_ques_num--------- bp_file_ques_num
bp_flag


from there first 2 columns of Input are mapped to output and bp_flag from lookup is mapped to output.

Very standard...just no clue why it won't matches values.
[/b]
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

What fields are you using to join the HF and Seq File..Can you please describe your input and hf metadata..
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

they are both hash files...both input and lookup

the columns I'm joining on are both varchar(10) and contain values like Q13A.

not sure what else to give
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

Whats

bp_file_ques_num--------- bp_file_ques_num ?

Is that how you are doing a lookup?
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

Yes those are the fields I'm joining or looking up on
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

johm73 wrote:Yes those are the fields I'm joining or looking up on
But I dont see that field in your input file.
johm73
Charter Member
Charter Member
Posts: 57
Joined: Tue Jan 11, 2005 3:47 pm

Post by johm73 »

Its there...the layout in my post looks wrong...but the spaces didn't hold correctly
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

Post by ranga1970 »

Just check your input columns and output columns in hash file are same..

and makesure you do trim and upcase, no matter they should work...

like you have ino put col as

Fname
lname
mname
seqid


and output as
Fname
mname
lname
seqid

and you are tryinb to make join on lname or mname it would faile

and secondly as said do trim and upcase where ever it is join on charecter fileds
RRCHINTALA
Post Reply