lookup failing gives wrong warning message

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
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

lookup failing gives wrong warning message

Post by mohanraj »

Hi

I have a doubt.Plz help me out in solving this
My job is like this seq----->trans------->oci

In trans I am doing many lookups and I specified the link order for them also.Now my question is when my lookup fails due to any link then it gives the same warning message as the last lookup is failing as my last lookup is ok.

Can you help me what shall I have to do to get the warning message as exactly which lookup is failing.

thanks in advance
mohan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Separate Transfomer stages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

Post by mohanraj »

Thanks ray

You mean to say I have to add seperate transformer for seperate lookups.

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

Re: lookup failing gives wrong warning message

Post by chulett »

No, not really. Help us out here...
mohanraj wrote:Now my question is when my lookup fails due to any link then it gives the same warning message as the last lookup is failing as my last lookup is ok.
I really don't understand what you are saying here. Can you provide some examples of these 'warning messages' you are asking about? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

Post by mohanraj »

Hi chulett

My problem is I am validating four of my source fields against some values.For this I have taken four reference links from four different hash files in transformer.Suppose consider my fourth lookup is "d".When I run my job and my second lookup fails and fourth lookup is correct then also I get warning message as fourth lookup is failing.When I changed the third col lookup as the last link order then my job log is giving as third col lookup is failed irrespective of which lookup is failed.

This shows that irrespective of my lookup the warning message what I will get is the last Input link order lookup.

Thanks in advance
Mohan
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

Could you please post exact error message that you are getting
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Mohan,
Still looks to be little confuse. Better post the warning or the error you are getting.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you want to identify which lookup failed you have two choices.
  • A separate Transformer stage for each lookup.

    Separate test conditions on each of the reference input links - either check the link variable NOTFOUND or whether the returned key value is NULL.
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 »

A separate Transformer stage for each lookup would be overkill, IMHO, but would certainly ease the confusion as to which lookup failed. :wink:

But I really don't see the confusion. Each lookup can be checked individually for success or failure. As noted, each will have its own unique NOTFOUND link variable that can be explicitly checked or you can do it the old fashioned way and check to see if a key field is null.

In your example with four reference lookups, if the second fails while the fourth succeeds but you are getting some kind of 'warning' logged that the fourth failed, then the job's logic to determine which failed is faulty. It's all under your control, each lookup either succeeds or fails and DataStage doesn't care one way or the other and it certain doesn't log anything when one 'fails', your job must be coded to do that. Heck, sometimes a lookup 'failure' is exactly what you want to happen and 'success' is a bad thing! That's why sometimes they are referred to as a 'hit' or a 'miss' on the lookup.

Bottom line, check your job and how it is testing each lookup. Post the code or constraint or something more specific to explain what you are doing / seeing and we can give more specific advice on solving this for you.
-craig

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