How to turn off rounding in a PX job?

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
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

How to turn off rounding in a PX job?

Post by Marley777 »

Hi, anyone know how to disable rounding in a PX job for decimal fields?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Review the rtype argument for decimal conversion 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.
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Hi Ray, started with the manual, but all the rtype options involve rounding of some kind. Is there another option?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about floor?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Using floor is working. Thanks Ray.
karrisuresh
Participant
Posts: 57
Joined: Sat Jun 09, 2007 1:14 am
Location: chicago

Re: How to turn off rounding in a PX job?

Post by karrisuresh »

HI Can you please explain me what do u mean by rounding the px job,
is it any particular field are yoy talking about??
Ray said using Floor function

too my knowledge it is used for a prticular field

please lemme know

thanks
Hi I have experience in parallel extender datastage I am ready to give/take help from other
hope we all help each other hand in hand
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Based on my experience Datastage based on precision and scale will try to round decimal fields when doing logic or calculations within a transformer.

For String to Decimal
StringToDecimal(inputvalues,'floor') works but not work for expo values. However I avoid this issue because I'm not dealing with expo values in this scenario.

We are using decimal to decimal and it seems to be working.

DecimalToDecimal(inputvalues,'floor')
Post Reply