Page 1 of 2

Decimal Places getting truncated while moving data

Posted: Sat Feb 16, 2013 12:06 pm
by kagnihotri
Hi I am new to data stage and i am also facing the issue.
We are using datastage runtime column prapogation for a table. The source value is 11111111111.489001 and in target getting 11111111111.489.
Decimal Places getting truncated while moving data
Could anybody pls help?

thanks

Posted: Sat Feb 16, 2013 2:26 pm
by chulett
Thanks for starting a new post, that's what you needed to do rather than find an old 'similar' post to add your question to. And rather than doing both. :wink:

ps. I deleted your 'extra' copy of this.

Posted: Sat Feb 16, 2013 2:29 pm
by chulett
So your source and target are tables? What database and what are the datatypes of the actual source and target database fields?

Posted: Sat Feb 16, 2013 6:57 pm
by kagnihotri
Thanks Craig...The source and target tables are oracle tables. Oracle Version is 11.1.0.7. The column data type is number in source and target.

Posted: Sun Feb 17, 2013 8:30 am
by chulett
An unbound number with no precision like NUMBER rather than NUMBER(15)? Both sides?

Posted: Sun Feb 17, 2013 9:42 am
by kagnihotri
Yets its NUMBER only.

Posted: Sun Feb 17, 2013 10:44 am
by prasson_ibm
Hi,
Then how are you getting decimal in target?

Posted: Sun Feb 17, 2013 12:44 pm
by kagnihotri
Oracle NUMBER datatype can store a decimal number. The source is NUMBER datatype and target is also NUMBER datatype.

The source value is 11111111111.489001 and in target i am getting 11111111111.489. I am using runtime column prapogation.

Please let me know if I misunderstood your qestion or if you need more details. Thanks in advance.

Posted: Sun Feb 17, 2013 3:34 pm
by kagnihotri
Hi Craig,

yes its NUMBER only...NO precision on both sides.

Posted: Sun Feb 17, 2013 5:41 pm
by chulett
My understanding is an unbound Oracle NUMBER is stored in floating point. Still, not sure why that value would be truncated during RCP - perhaps there is an APT variable that needs to be set? Or perhaps a patch.

Posted: Sun Feb 17, 2013 11:04 pm
by kagnihotri
HI Craig, I checked and found that the issue is with the precision. When I increased the precision of source number to more then 15 digits, the target number is getting round off. Could you please help?

Posted: Mon Feb 18, 2013 12:47 am
by ray.wurlod
How have you set the SCALE ?

Posted: Mon Feb 18, 2013 1:28 am
by kagnihotri
I havent set any scale or precision... But what i found is that even if the source number is having more than 15 digits before decimal and any number of digit after decimal, the target is having total of 15 digits(with or without precison,,

Could you please let me know how to set scale or precision if runtime column prapogation.?

Posted: Mon Feb 18, 2013 8:35 am
by chulett
Well, 15 is a magic number and (from what I recall) the default precision limit under the covers in DataStage. Problem is I don't recall and couldn't find via a search how to change that... guys, is there an APT variable for that? In uvconfig? :?

Posted: Mon Feb 18, 2013 9:13 am
by eph
Hi,

You could try APT_DECIMAL_INTERM_PRECISION and APT_DECIMAL_INTERM_SCALE to set at project level those properties.

Eric