How to round the numeric values

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
MVL
Premium Member
Premium Member
Posts: 33
Joined: Wed Apr 30, 2008 5:43 am

How to round the numeric values

Post by MVL »

Hi

I want to round the values to 2 decimal places. How can it be done in PX? and in which stage?

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

Post by ray.wurlod »

What is the current data type that you want to round, and what is the data type of the field where you want to store the result. Knowledge of both of these things is essential before one can choose the correct function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MVL
Premium Member
Premium Member
Posts: 33
Joined: Wed Apr 30, 2008 5:43 am

Post by MVL »

Thanks Ray for reply.

Input column is Decimal(38,4). I want to round it to 2 decimal places.
Oh and I think that would be done if I just mention precision = 2 in output column of transformer...(?). Your views please?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Depends. What is the data type of the output column? As I stated, one needs to know both to determine whether an implicit conversion can be done or whether to override the default rounding strategy or whether an explicit function is required.
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