Page 1 of 1

Lookup Not Happening

Posted: Fri May 30, 2008 10:08 am
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.

Posted: Fri May 30, 2008 11:50 am
by keshav0307
what is the reference source,
try to elaborate the problem in more details

Posted: Fri May 30, 2008 4:09 pm
by ray.wurlod
Ur was a city in ancient Babylonia - the second person possessive pronoun is spelled "your".

Are the two fields identically trimmed?

Posted: Fri May 30, 2008 11:13 pm
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 ?!

Posted: Sat May 31, 2008 2:16 am
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?

Posted: Fri Aug 15, 2008 2:01 am
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