Using of ROUND function

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Harshagks
Participant
Posts: 3
Joined: Wed May 07, 2008 5:18 am
Location: Infosys Hyderabad

Using of ROUND function

Post 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?
Harsha gks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Re: Using of ROUND function

Post 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") 
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not in a parallel job (unless in a BASIC Transformer stage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Post 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!
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
Post Reply