Page 1 of 1

Phanto Error - Warning

Posted: Thu Jan 12, 2006 2:25 pm
by satish_valavala
What would be the following warning message,

DataStage Job 102 Phantom 20769
Program "JOB.122335461.DT.132456721.TRANS3": Line 1234, Variable previously undefined. Zero length string used.

Thanks
VS

Posted: Thu Jan 12, 2006 2:36 pm
by ArndW
Just what the message says - the program has referenced a variable before it was assigned a value. If you use an undeclared stage variable or similar in a derivation you will see this error. Check your transform variable usage - it may even show up in red in the designer.

Posted: Thu Jan 12, 2006 5:20 pm
by ray.wurlod
Arnd, I thought you were on vacation! Didn't want to risk the slopes on Friday the thirteenth, eh?

Posted: Thu Jan 12, 2006 10:58 pm
by Vijay Kumar
Hi,
I too get the same warning msg some times.
When I change the input file, then I am not getting this sort of warning. I though it might be the issue with the data.
I have verified all the routiens, tranformation functions and stage variables. None of them are undeclared.
Is there any other reason for these panthom warning??

Thanks & Regards
Vijay Kumar

Posted: Thu Jan 12, 2006 11:43 pm
by ray.wurlod
It's not undeclared so much as uninitialized.

When you create stage variables, make very sure that you always give them an initial value.

Of course it may not be a stage variable that's causing this message. It may (for example) be a variable within a routine that's not assigned, which may mean that there is a path through its code in which the variable named Ans is not assigned, or that there is some other variable name used where that variable was never assigned a value; this smacks of insufficient/incomplete testing of the Routine.