Page 1 of 1

Using of ROUND function

Posted: Mon May 26, 2008 6:24 am
by Harshagks
Hi,

I want to implement a ROUND function to get a value.
Like,
TOTAL AMOUNT = ROUND(Conversion Rate * Amount,4)

Example:
Conversion Rate = 1.234564
Amount = 56
TOTAL AMOUNT = 69.135584 but after the ROUND operator the value
sholud be 69.1356.

How can this be implemented in the Datastage?

Posted: Mon May 26, 2008 3:38 pm
by ray.wurlod
Modify stage with output link having a scale of 4 for this particular Decimal data type. Use decimal_from_decimal() function with [round_inf] as the rtype argument.

Re: Using of ROUND function

Posted: Tue May 27, 2008 2:12 pm
by vivekgadwal
Harshagks wrote: Conversion Rate = 1.234564
Amount = 56
TOTAL AMOUNT = 69.135584 but after the ROUND operator the value
sholud be 69.1356.
Try this:

Code: Select all

 FMT(Arg1*Arg2, "R4") 

Posted: Tue May 27, 2008 2:51 pm
by ray.wurlod
Not in a parallel job (unless in a BASIC Transformer stage).

Posted: Tue May 27, 2008 3:05 pm
by vivekgadwal
ray.wurlod wrote:Not in a parallel job (unless in a BASIC Transformer stage).
My bad...I haven't seen the "Parallel Job" note here!