a problem with rounding a series of numbres

One Star

a problem with rounding a series of numbres

Hi,
i've a problem with rounding a series of numbres.
for exemple :
1|2012|1|1.7108333333333332|6.591666666666668|50.5225|2.098333333333333|33394.35
i've tried with "tmap", and the expression was DataOperation.FIX(value)
It worked and i've got this resulat :
1|2012|1|2.0|7.0|51.0|2.0|33394.0

but i would like to keep the 2 last numbre after the decimal,
just like
1|2012|1|1.71|6.59|50.52|2.10|33394.35
i have tried with DataOperation.FIX(value,2) and (DataOperation.FIX(value*100))/100
it didn't work...
and does anyone can help me?? where can i set up the precision?
thanks
Miao
One Star

Re: a problem with rounding a series of numbres

Hi Miao
Just modify the schema of input component as the following images.
Regards,
Pedro
One Star

Re: a problem with rounding a series of numbres

hi,
how are you?

i've modified the schema of input component, but there is a error :
The method FIX(double) in the type DataOperation is not applicable for the arguments (BigDecimal)...
One Star

Re: a problem with rounding a series of numbres

Hi Miao
I'm fine. Smiley Wink
Create job as follow.
tFileInputDelimited --> tLogRow
There is no need to use FIX() method here.
Hope this can help you.
Regards,
Pedro
One Star

Re: a problem with rounding a series of numbres

Can i send a mail to you with my job, because i have other components before this step...
Hi Miao
I'm fine. Smiley Wink
Create job as follow.
tFileInputDelimited --> tLogRow
There is no need to use FIX() method here.
Hope this can help you.
Regards,
Pedro
One Star

Re: a problem with rounding a series of numbres

Hi
No problem. Just send it to me.
Regards,
Pedro
One Star

Re: a problem with rounding a series of numbres

Hi
How about the problem?
Is that solved?
I'm in same problem.
I use TOS v5.1.1.