Page 1 of 1

DataStage Job 96 Phantom 5996

Posted: Thu Dec 23, 2004 12:19 pm
by gdheatley
DataStage Job 96 Phantom 5996
Program "DSD.StageRun": Line 755, Variable "$R61" previously undefined. Empty string used.
DataStage Phantom Finished

Any ideas? Very simple job, single transform that does call a routine and uses stage variables, but thats about it.

Posted: Thu Dec 23, 2004 2:02 pm
by ArndW
apart from trying to look at the generated code (not recommended for the meek) there is not direct way to do this; I'd start commenting out likely causes in a test copy of the until the warning goes away.

Re: DataStage Job 96 Phantom 5996

Posted: Thu Dec 23, 2004 2:05 pm
by ogmios
gdheatley wrote:DataStage Job 96 Phantom 5996
Program "DSD.StageRun": Line 755, Variable "$R61" previously undefined. Empty string used.
DataStage Phantom Finished

Any ideas? Very simple job, single transform that does call a routine and uses stage variables, but thats about it.
A variable is used in the job which was not defined, probably a typo somewhere in your stage variables or so. What I try to do in these cases is to have a real error in the job. When DataStage then compiles the job it will leave the generated source somwhere in the project directory... I usually check the changed date of the files to find the last generate file, they have these akwards names as JOB.2233901952.DT.1241931882.xxx.

The line number in the error message is the line number in this generated source (minus some offset).

Ogmios

Posted: Thu Dec 23, 2004 3:08 pm
by ray.wurlod
You won't see a variable called $R61 in the code; this is a temporary variable used to hold some intermediate value in an expression. It will, therefore, be that more difficult to track down.

Test your Routine rigorously; make sure there is no path through it in which any variable (including the arguments) can be in an unassigned state. Include tests (using the UnAssigned() function) at the top of the routine to supply default values or generate errors if a routine argument has not had a value assigned to it.

DataStage Job 96 Phantom 5996

Posted: Fri Dec 24, 2004 9:00 am
by gotosarath
What Ray said is right. This error occurs if I use a code like

Case Arg1 = 1
Then Ans = 'abc'
Case Arg2 = 2
Then Ans = 'xyz'
In the baove code I havent handled a condition where Arg1 is neither 1 nor 2. This is a simple code.

Thanks,
Sarath

Re: DataStage Job 96 Phantom 5996

Posted: Thu Feb 08, 2007 2:51 pm
by Tatiana
what directory do you search in for the files to find the last generate file such as JOB.2233901952.DT.1241931882.xxx?

Thanks.

Posted: Thu Feb 08, 2007 3:01 pm
by I_Server_Whale
Hi Tatiana,

You just hijacked a 2 year old thread. If you question is related to this post, then start a new thread with this post as a reference in your new post.

You will find the file under respective RT_BPxxx folder in your project directory.

Whale.