How to round column values in Data Stage?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sprasad55
Participant
Posts: 11
Joined: Thu Dec 28, 2006 4:16 pm

How to round column values in Data Stage?

Post by sprasad55 »

Can any one tell me how to round column values through data stage?

e.g 2.333 = 2.34 (Round to two decimals)

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

There are several ways. One of them is

Code: Select all

FIX(in.Col, 2)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Or Try this :Oconv(in.Col, "MD2").
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or! Check out the FMT command. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

As I mentioned, a lot of ways :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply