NOTFOUND function dont work in DS 6

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
Fersca
Participant
Posts: 1
Joined: Mon Feb 14, 2005 4:17 pm
Location: Argentina

NOTFOUND function dont work in DS 6

Post by Fersca »

Could it be possible that the link.NOTFOUND function have a bug in datastage 6, I was all the week traing to make it works , I tested it in every way I imagied, but its still not working. The problem is the following, when I make a relation between to tables and I ask if the relation was null using link.NOTFOUND in the constraint of the destination table but it retrives me all the rows when its supossend not to do that, it works if I use the function isnull(), where am I commiting the mistake?
greeting,
Fer
susanm
Premium Member
Premium Member
Posts: 4
Joined: Wed Jan 08, 2003 4:45 pm

Post by susanm »

It may depend on the stage type before the reference link.

I have experienced the linkname.NOTFOUND property to not work on 7.1 when the reference link was coming from an Oracle OCI stage.

Like you, I ended up using the IsNull() function to test if the reference was found or not.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: NOTFOUND function dont work in DS 6

Post by chulett »

Fersca wrote:Could it be possible that the link.NOTFOUND function have a bug in datastage 6
Yes, it's certainly not out of the realm of possibility.

Back in the day, before the NOTFOUND was added, the only way to check the success of a hash lookup was the IsNull function. When NOTFOUND was first introduced, I started trying to use it and found to my horror that it didn't always work! :shock: So, I've gone back to my old ways and still pretty much always check a key field for null to test for success or failure.

Now, I'm sure it works perfectly fine now, however old habits die hard and I see no burning need to switch.

You might want to post your exact 6.x version of DataStage and see if there is a higher maintenance release available. Either that or upgrade into the 7.x family... preferably 7.5.
-craig

"You can never have too many knives" -- Logan Nine Fingers
peterbaun
Premium Member
Premium Member
Posts: 93
Joined: Thu Jul 10, 2003 5:27 am
Location: Denmark
Contact:

Post by peterbaun »

Hi -

As susanm writes I too have found that link.NOTFOUND doesn't work when used with a lookup to an ODBC- or DB2 Stage - it only seems to work when the lookup comes from a hashfile. Use the IsNull() function as suggested.

Regards
Peter
Post Reply