|
Specify 2 as the rounding criteria in the ROUND() function:
data a;
i = .5; j = 1.5; k = 2.5;
array num _numeric_;
do over num;
rounded = round(num,2);
put num= rounded=;
end;
run;
-----Original Message-----
From: knvsol [mailto:knvsol@COMCAST.NET]
Sent: February 5, 2004 5:03 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: round to nearest even number
Trying to recreate in SAS what Cint does in vbscript. Basically what
I need is to be able to round to nearest even number. ( i.e. 0.5--> 0
and 1.5 -->2 etc.) any ideas?
knvsol
|