how to track the lookup Result that is not matched by 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
abha.kalra
Participant
Posts: 37
Joined: Fri Oct 21, 2005 4:09 am

how to track the lookup Result that is not matched by lookup

Post by abha.kalra »

Hi,
In my job i m using a oracle lookup.
I want keep track of all the recods that is matched by the lookup key and also that doesnot match.
for this i m using the property - linkname.NOTFOUND(or NOT(linkname.NOTFOUND)) at constraint level,but it is not giving the desired result.it is sending all the records to the matched target file.
can anyone tell why is it behaving like this.
OR
if any one has any other solution for how to track the lookup result for matched and unmatched records then please let me know.
Thanks and Regards
Abha
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Instead of linkname.NOTFOUND(or NOT(linkname.NOTFOUND))
use
isNull with all the lookup keys to see if all are null then no match is found otherwise a match is found.

linkname.NOTFOUND manytimes doesn't work correctly with lookup stages other than Hashed File lookups.
Success consists of getting up just one more time than you fall.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

loveojha2 wrote:linkname.NOTFOUND manytimes doesn't work correctly with lookup stages other than Hashed File lookups.
Unfortunate but true. It doesn't seem to work at all with the OCI stages, probably because they haven't coded them to support it. :?

The only stage I used the NOTFOUND status with is a hashed file stage, all others IMHO should fall back to the 'old style' check-a-key-field-for-null post lookup technique, the only way you had before they added the NOTFOUND status. You only need to check one, not all, but if there's a key field you know you put something in and now it's null, the lookup failed.
-craig

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