Page 1 of 1

How to turn off rounding in a PX job?

Posted: Wed Nov 10, 2010 11:44 am
by Marley777
Hi, anyone know how to disable rounding in a PX job for decimal fields?

Posted: Wed Nov 10, 2010 3:40 pm
by ray.wurlod
Review the rtype argument for decimal conversion functions.

Posted: Wed Nov 10, 2010 4:04 pm
by Marley777
Hi Ray, started with the manual, but all the rtype options involve rounding of some kind. Is there another option?

Posted: Wed Nov 10, 2010 9:12 pm
by ray.wurlod
How about floor?

Posted: Thu Nov 11, 2010 8:50 am
by Marley777
Using floor is working. Thanks Ray.

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

Posted: Thu Nov 11, 2010 8:54 am
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

Posted: Thu Nov 11, 2010 9:25 am
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')