Rounding off function in PX

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
Ramani
Participant
Posts: 58
Joined: Mon Oct 08, 2007 1:51 am

Rounding off function in PX

Post by Ramani »

Hi,

Is there a function to round off number value.

something like

Round(10.1245, 2) = 10.13

Thanks
Thanks
mahadev.v
Participant
Posts: 111
Joined: Tue May 06, 2008 5:29 am
Location: Bangalore

Post by mahadev.v »

Use DecimaltoDecimal conversion. rtype I think is 'round_' something. Search the parallel job developers guide on 'rtype'.
"given enough eyeballs, all bugs are shallow" - Eric S. Raymond
Vikas Jain
Participant
Posts: 15
Joined: Tue Dec 13, 2005 12:38 am

use round_inf

Post by Vikas Jain »

Hi,
It might have been a little late for you, but I saw this thread today while scanning through something else.
One of the way ( a convenient one) to achieve round off in PX is using round_inf as an argument with type conversion function like DecimalToDecimal
An example can be like this:
DecimalToDecimal((LNK_JOIN_CUSTOMER.AVERAGEAGE_OF_ACCOUNTS/ 365),'round_inf')

hope this helps to other Datastagians
~~Vikas~~
Post Reply