How to do round function in Datastage server jobs

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
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

How to do round function in Datastage server jobs

Post by ysrini9 »

Hi All,

could you please help how to round function in server jobs insted of trunc function in oracle

Ex: 6.6955 result : 6.7

Thanks in Advance support
Regards
SHRINIVAS
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Oconv(InLink.TheValue, "MD1P")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's also the FMT function, from what I recall.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

FMT(InLink.TheValue, "10R1") will work but include leading space characters. You may need to wrap a TrimF() around that. For that reason I would prefer the Oconv() form.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad.bodduluri
Participant
Posts: 30
Joined: Tue Jan 30, 2007 5:21 am
Location: bangalore

Post by prasad.bodduluri »

Use FIX function for rounding purpose
prasad
Post Reply