Lookup Not Happening

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Lookup Not Happening

Post by poornima.chandramouli »

I'm using Datastage 7.5.1

I was doing a lookup on a filed which has values like 'TCSCLINTGRPID6' on both the master & reference.

It is a varchar field of length 15.

But i was not getting a hit.

Awaiting for ur help in this regard.
Regards
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

what is the reference source,
try to elaborate the problem in more details
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ur was a city in ancient Babylonia - the second person possessive pronoun is spelled "your".

Are the two fields identically trimmed?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Post by poornima.chandramouli »

[quote="ray.wurlod"]Ur was a city in ancient Babylonia - the second person possessive pronoun is spelled "your".

Are the two fields identically trimmed? ...[/qu



Both these fields are from db2 source.

Both these fields are identically trimmed in the extract query itself like LTRIM(RTRIM(Field)).

As well as these fields are trimmed in the previous jobs before this lookup job in the transformer stage by using trimleadingtrailing() funtion.

When i view the datsets(both master & reference),i didn't find any spaces in between,both the values seems to be identical.

then what might be the possibility.

Even i tred using APT_PAD_CHAR environment variable in my job.
But Even that was not working.

I tried using join & merge,both these stages doesn't find any hit.

But if try joining these tables by using a simple join query,I was getting a valid hit.(Query returns valid values).

What might be the problem?

Does it is a problem with the datastage ?!
Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Need to think about that for a bit. Meanwhile why not simply perform the join in DB2, since that seems to work?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mattias.klint
Premium Member
Premium Member
Posts: 43
Joined: Wed Oct 18, 2006 6:03 am

Post by mattias.klint »

I think I have the same problem.

I'm doing a lookup on a table in a DB2 database. The field that I'm trying to do the lookup with is a varchar(16) and the data is '111222333'(9 characters). It fails.

If I hardcode the data in the previous transformer it works. (Not using the DSLink.xxxxx input.)

If I change the input field from 16 to 9 characters, the same length as the data, it works. The table still has 16 characters in the field.

I want it to match and still have 16 characters in the input field since there will be diffrent lengths of the data in the future.

I tried all the diffrent trim() functions without any luck.

I'm using DS 8.

(not sure if it's ok to highjack a thread, but since it's the same topic)

/Mattias
Post Reply