Data Issue with Datatype

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Data Issue with Datatype

Post by vamsi.4a6 »

Source is Oracle Table and target is also oracle table.

Col1 is Number datatype in source table and Col1 is Float(126) datatype in Target table.One to one mapping between source and target.In Datastage job i am reading col1 as Decimal 38,10 and propagating this field till target.In some cases I am not getting correct output.

SOURCE:

COL1
-10240547.950000

current output:
COL1
-10240547.949999999

expected output:
COL1
-10240547.950000

TO be short what ever it is there in source i need in target with out rounding.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not really any different from your other post discussing this data type I'm afraid.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No computer can store float data type accurately 100% of the time. There are IEEE papers out there explaining why. You could try changing the data type to DECIMAL(38,2) or using explicit rounding functions.
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