Date: Thu, 5 Feb 2004 17:23:15 -0500
Reply-To: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject: Re: round to nearest even number
Content-Type: text/plain; charset="iso-8859-1"
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
|