HOW TO GIVE NOT EQUAL CONDITION IN LOOKUP

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
vmalviya
Participant
Posts: 4
Joined: Mon Jul 04, 2005 12:00 am

HOW TO GIVE NOT EQUAL CONDITION IN LOOKUP

Post by vmalviya »

IN CONSTRAINS I GIVINING THIS CONDITION
Feed.HFEDU_ID <> LKPHash.HFEDU_ID
FOR NEW DATA LOAD AND FOR OTHER REJECT ROW
BUT FOR NOT EQUAL, I DON'T KNOW WHY THIS CONDITION IS NOT WORKING EVEN WHEN I AM GIVING Feed.HFEDU_ID = LKPHash.HFEDU_ID FOR REJECT ROW OR CAN SAY REJECT OLD ROW I AM GETTING PROPER RESULT,BUT IN LOG I M GETTING LOTS OF WARNING MESSAGES

can any one suggest me how we can use <> condition so i won't get any warnings in my log.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Please tell us what the warning messages are.

(and YOU DON'T NEED TO SHOUT, we may be old geezers but can still hear well enough when the batteries are charged :wink: )
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Only "=" works with the Hashed File stage.

To use "<>", "BETWEEN" or any other operator you need an SQL-based stage serving the reference link. A UV stage would do it, or any database stage.

But first ask yourself is this really what you want? It will return very many rows for every row processed on your main (stream) input link.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, only equal comparisons work in a Hash lookup. You check for 'not equal' by looking for the failure of your equal check. Typically. There will be an Output Link boolean variable called NOTFOUND that will be TRUE or you can check to see if your key value is null after the lookup - hash misses set all field values to null.

And as also noted, sharing whatever error messages you are getting helps us figure out what is going on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dsnovice
Participant
Posts: 38
Joined: Thu Jul 22, 2004 11:56 pm
Location: Mclean, VA
Contact:

Post by dsnovice »

Can you use ISNOTFOUND(LINKNAME) to satisfy this condition?

Thank you,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Possibly - but it would be LinkName.NOTFOUND instead. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply