Problem to use NOTFOUND

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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Even though I haven't had this problem, I have read in this forum that several people have had problems with this not working correctly.

The recommendation has been to use the fact that upon a failed lookup the columns are returned as NULL and can be detected with a IF ISNULL(Lookup.ColumnName) condition.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

My Rule Of Thumb is to use NOTFOUND only on hashed file lookups and the old school IsNull check for all other reference lookups.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shepli
Participant
Posts: 79
Joined: Fri Dec 17, 2004 9:56 am

RE: Problem to use NOTFOUND

Post by shepli »

Thanks for all your help.

It seems the NOTFOUND does not always catch the NULL value from a failed lookup. I'll use ISNULL(Lookup.ColumnName) in my job.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I guess moderator could NOTFOUND the server forum and hence moved_to 'looking for talent' :wink:
whardeman
Posts: 111
Joined: Mon Oct 21, 2002 11:17 am
Location: Fort Worth, Tx
Contact:

Post by whardeman »

I honestly have no idea how this thread wound up in "Looking for Talent" in the first place if it was not originally posted there by the author. Despite my feeble technical knowledge, I could guess from context that this was not a work advertisement or an appeal for skilled help.

Was this post originally in the Server forum and subsequently moved to Looking for Talent before being moved back? I first took notice of this thread when I saw it in the L.F.T. forum, so I can't imagine who might have moved it there.

It's not of great concern, but it is rather odd.



P.S. Taunt the moderator at your own risk. :wink:
Walter Hardeman
Webmaster
Post Reply