Rounding 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
kd813
Participant
Posts: 20
Joined: Wed Feb 22, 2006 9:14 pm
Location: pune

Rounding in PX

Post by kd813 »

I have a decimal input and wanted to round it to one decimal place
ie if input is 2.34 output should be 2.3
ans if IP is 2.19 OP should be 2.2

Kindly provide a solution as to how to achieve this
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please delete duplicate post.

Take a look at the Parallel Job Developer's Guide - in particular number conversion functions. Differentiate ceil, floor, round_inf and trunc_zero.

Please post your research findings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kd813
Participant
Posts: 20
Joined: Wed Feb 22, 2006 9:14 pm
Location: pune

Post by kd813 »

i have tried using DecimalToDecimal(Link.Field,'round_inf') but this is not giving me the desired output
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What are you getting and what is your desired result? Also keep in mind that the rounding will take place keeping your specified scale in the metadata. WHat is the metadata of your source and target column?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply