Rounding of Decimals places

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
cooperjv
Premium Member
Premium Member
Posts: 29
Joined: Thu May 13, 2004 3:18 pm

Rounding of Decimals places

Post by cooperjv »

I have a stage variable which I defined as Decimal(38,28). If in this stage variable I divide 1.000000000000000000000000000 by 3.0000000000000000000000000000. I get an output of 0000000000.3333333333000000000000000000 instead of 0000000000.333333333333333333333333333. Some how the last 18 digits of the output are all zeros. Could any one let me know how I can get the correct output

The input and output to this stage variable are Decimal(38,28)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is an environment variable that governs intermediate precision of decimal calculations. I'm not at a site where I can check, but its name is something like APT_DECIMAL_INTERM_PRECISION. This may help.
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