Phantom Error - Variable previously undefined

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
shaimil
Charter Member
Charter Member
Posts: 37
Joined: Fri Feb 28, 2003 5:37 am
Location: UK

Phantom Error - Variable previously undefined

Post by shaimil »

Does anyone know how I can stop phantom error messages appearing on the log.

I have a simple outine that receives a parameter and checks for Null or an empty string. The problem is that when the routine is passed a null I get the message "variable previously undefined....." as a phamtom in the log.

Any ideas on dealing with this message would be appreciated.

Thanks
Shay
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

Guessing, I would say your routine contains a processing path that leads to a variable that is undefined when the input is NULL. If you initialize ALL your variables or ensure that all variables have a value in the routine this problem will go away. I use commonly accepted programming practices and always initialize everything that can be intialized (old fashioned? maybe) so that their values are always predictable at any given time.
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Also remember that DataStage basic is case sensitive, so a variable named TonysVariable is not the same as Tonysvariable. You may be seeing an issue where one of the variables that you're using is misspelled.

Good Luck,
Tony
mayank007
Participant
Posts: 8
Joined: Thu Sep 30, 2004 5:16 pm
Location: California

Re: Phantom Error - Variable previously undefined

Post by mayank007 »

Hi,

The Phantom error comes mostly due to a data type mismatch. You would need to analyze your meta data mappings to see if all the columns i.e. source and target are in sync with each other with respect to the meta data. It could happen that the error has creeped in one of the transformers that you are using. Check in the transformer for meta data types.

Mayank
Post Reply