What function can I use to round?

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
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

What function can I use to round?

Post by igorbmartins »

Hi,

I have a problem, somebody can help me?

I have one field PCT_CASA decimal (15,4), so I want to round. What function can I use to do this?

EX: 12,8765

Answer: 13

EX_2: 12,1765

Answer: 12

Thanks

Igor Bastos Martins
http://www.oportunidadesembi.com.br
Last edited by igorbmartins on Sun Jul 20, 2008 8:36 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Off the top of my head, the FMT function can round to a specified number of digits. You can also just move it to a field defined with a scale of 0, I would think.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: What function can I use to round?

Post by sachin1 »

hello please use the SDK routine provide NumericRound0(12.8765) --->gives 13 as output.

convert your "," with "."
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

Re: What function can I use to round?

Post by igorbmartins »

Thanks for all.

Igor Bastos Martins
http://www.oportunidadesembi.com.br
Post Reply