Difference between two numbers

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
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Difference between two numbers

Post by pradkumar »

Hi

I am trying to substract two entries as follows:

Field1 Field2 difference(Field1-Field2)
3458.90 3458.90
45621.12 -45621.12
When I was trying to do Field1- field2, the datastage is giving an phantom error "Datatype is not proper". I am having all three as numeric datatype.
Even I tried Iconv and Oconv using MD..But when field1 is present and filed2 is empty, there is no result. But if field2 has "0" present in it, it is giving the output.

Then I tried inserting "0's" in emtpy fields of field1 and field2. But my IF condition is npt wprking for it (If Isnull(Field1) then 0 else Field1)

How to solve this?
Pradeep Kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Start by posting the exact error message. Improper data type may be completely unrelated to your arithmetic. Also post your job design.
You might also benefit by searching the forum for the error message text.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

The Error message is omewhat like this

DataStage Job 1738 Phantom 8193
Program "JOB.1518842743.DT.1420153957.TRANS1": Line 279, Improper data type.
Attempting to Cleanup after ABORT raised in stage gl_headers2..Transformer_100
DataStage Phantom Aborting with @ABORT.CODE = 3


My job design is pretty straightforward.

Input(Database)--> TX-->Output(Database)

I am implementing simple filed1 - field2 in my derivation

Plz help me out
Pradeep Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

pradkumar wrote:Program "JOB.1518842743.DT.1420153957.TRANS1": Line 279, Improper data type.
Have you looked to see where this is in your job? The error message will have mentioned a job number so you won't have to look it up from the job name. Go to your Projects directory and into the particular project for your job, you'll find a RT_BPnnn directory there where nnn is the job number. Inside that directory is the TRANS1 file mentioned in the error message.

It's a text file, source code for the transformer in question. Check around line 279 to see what portion of the code is actually causing the problem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply