Phantom Error Not in Log for Debugger but it is for regular

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
larryoceanview
Participant
Posts: 70
Joined: Fri Dec 26, 2003 3:14 pm
Location: Plantation, FL

Phantom Error Not in Log for Debugger but it is for regular

Post by larryoceanview »

Why do I not get the phantom error in the log when running the debugger?, but it is in there for a regular run.

I am getting the following error which I received many times before and corrected by going to the line in the trans2 file in RT_BP(jobnumber).

DataStage Job 961 Phantom 20315
Program "JOB.1015626726.DT.1324648301.TRANS2": Line 2501, Nonnumeric data when numeric required. Zero used.

I used the function Num and IsNull with trim and my own scrubbing to verify that what I have is truly a number otherwise force a zero which is the default of the phantom error.

So basically I am looking for an answer to why the debugger does not write phantom errors to the job log and any other suggestions to finding the bad data. 8)

I can live with the warning in the log but I would rather know the reason why.

Thanks,
Larry
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
just a thought, have you tested for an empty string?

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
larryoceanview
Participant
Posts: 70
Joined: Fri Dec 26, 2003 3:14 pm
Location: Plantation, FL

Post by larryoceanview »

roy wrote:Hi,
just a thought, have you tested for an empty string?

IHTH,
Is a empty string "", if it is I didn't, I thought IsNull will pick up an empty string. I think I misread the documentation. I'll try it.

Thanks,
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Len(Trim(<string>)) will be equal to zero for both @NULL & empty string values.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
larryoceanview
Participant
Posts: 70
Joined: Fri Dec 26, 2003 3:14 pm
Location: Plantation, FL

Post by larryoceanview »

roy wrote:Hi,
Len(Trim(<string>)) will be equal to zero for both @NULL & empty string values.

IHTH,
Didn't work, :shock: The problem is that I have about 500 thousand records on the input file and the log doesn't tell me which ones are having the problem. If I use the debugger everything is fine, no errors, can't see any visually. I can't isolate the bad records with intrinsic functions and tests. Maybe I'll create a function, pass my two parameters and see what happens! The error is currently screaming on addition of two stage variables and the subsequent mapping.

Thanks,
Larry
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Edit your breakpoint. Make it an expression such as (colname = "" Or IsNull(colname)). Hit Go; the job continues to execute until such a row occurs. THEN strap on the Sherlock Holmes gear!

A zero length string has a known value, and is therefore not NULL, and therefore it will not be detected by the IsNull() function.

DataStage has a particular internal representation of NULL, which is automatically and invisibly converted to when a NULL is encountered in source data.

In the Sequential File stage only, however, "" is treated as NULL by default, unless you override this on the Format tab. This has caught more than one DataStage developer!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply