Warning at the end of the job execution

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
luca
Participant
Posts: 81
Joined: Wed May 14, 2003 11:34 pm

Warning at the end of the job execution

Post by luca »

Hi !

One of the job here gives a warning at the end of the execution.

Message is:
DataStage Job 54 Phantom 29394
Program "JOB.148334321.DT.1292550524.TRANS1": Line 680, Variable previously undefined. Zero length string used.
DataStage Phantom Finished

The job is composed of:
TRANSFORMER INPUT: 1 sequential file, 1 Hashed file (look-up);
TRANSFORMER;
TRANSFORMER OUTPUT: 2 sequential files and 1 ORABULK stage;

The problem probably comes form the data as this runs fine with some test input file but gives this warning sometimes with PROD input files.

Nothing special in &PH& repository.
I know there is a way to view the code generated by DS, but don't remember how. Can someone tell me?
If the warning message gives you some idea, please let me know too.

Thanks.
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

I've received this message before when I called a routine and some sequence of logic caused me to set Ans = to some variable that I had never initialized (never set to a value).

Hope this helps,
Tony
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

JOB.148334321.DT.1292550524.TRANS1 is a file in the RT_BP54 directory and contains the source code generated by your Transformer stage being compiled.
Look in and around line number 680 in this code (the line number is not always 100% accurate) to see what kind of expression might be using a variable whose value has not been assigned.
I tend to agree with Tony that the most likely cause is a Routine in which there is a path through the code in which Ans remains unassigned. The moral of that story is always to initialize the Ans variable, even if it's Ans = @NULL.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
msigal
Participant
Posts: 31
Joined: Tue Nov 26, 2002 3:19 pm
Location: Denver Metro

Post by msigal »

Our users receive this type of error somewhat frequently. A common cause is a mis-typed stage variable in an expression. You can compile successfully with incorrect case but when the job runs you'll receive this kind of error. Example:

If myStageVariable = "good" Then "good" Else If mystagevariable = "bad then "bad" Else "invalid"

If the stage variable is really myStageVariable the all lower case version would cause the error, yet the job would still compile. If your test data never hits the Else statement this would explain why it doesn't error using the test file.

Myles Sigal
Technical Analyst
Thomson - Medstat
777 E. Eisenhower - 435B
Ann Arbor, MI 48108

myles.sigal@medstat.com
734-913-3466
Post Reply