Page 1 of 1

NOT FOUND CONDITION

Posted: Fri May 28, 2004 6:11 am
by raj_cipher
Hi ,

I have a doubt regarding the NOTFOUND condition.
My job looks like
lukup(OLEDB)
|
|
V
FILE ----> Transformer -------> FILE

My requirement is if lukup found means populate the looked up valuee else populate input value

I gave the condiotion if link.NOTFOUND = 0 THEN lookedupvalue else input value

I'm not gettingthe desired result. i.e If the look up doesn't have matching value means it is populating spaces.If look up returns means it is populating the looked up value.

Am i missing anything here ? What should i do to get the input value in case of look up not neturning value.The same situation works fine with ODBC look up.

the look up should point to the transformer

Posted: Fri May 28, 2004 6:13 am
by raj_cipher
oops ! !!!!!!!!
the look up should point to the transformer

Posted: Fri May 28, 2004 6:20 am
by chulett
As far as I know, these are boolean values and not meant to be used in quite the way you are using them. You should simply say:

Code: Select all

if link.NOTFOUND Then input value Else lookedup value
I'm not sure what you mean about the spaces, but give it a shot like this and see how that works for you.

I remember (back in the day) when these variables were first introduced - they didn't always work correctly. :? We backed off from them and went back to the 'old way' of checking for nulls in a lookup key and I've never really used them since. For whatever that is worth. :lol:

Posted: Fri May 28, 2004 12:24 pm
by tomengers
We found that NOTFOUND was solid when used in a DS390 job to test results of a DB2 referential read ... but returned variable results when used in a Server job to test Hash success.

... tom

Posted: Fri May 28, 2004 2:06 pm
by ds_developer
I have never had any problem with NOTFOUND. We use it extensively. You need to know your data:

If you trim the key field when writing to a hashed file then you need to trim your key expression when trying to match (this is a hashed file example, but you get the idea).

John