in addition: the round function is very flexible! You can use any number as
second argument. E.g you might want to round a DATETIME value (seconds) to
hours, you can use round(datetime,60*60), to days: ....,60*60*24, ... or
even to half-hours: ....,60*30). Also you can write that more readable:
That is very useful for something like MERGEing or for comparing, ...
On Thu, 29 Jul 2004 14:06:07 -0700, David Fickbohm <DavidF@HOMEGAIN.COM>
>One way would be to use the round function.
> set aaa;
> rounded_result = round(unrounded_original,1);
>Then use the rounded_result in your proc print. If you are trying to round
>a number past the decimal place then you need to include the decimal place
>in the round off unit in the function, ie. unrounded_original is 10.65
>and you want 10.7 then use
>rounded_result = round(unrounded_original,.1);
>hope this helps
>From: Sharon [mailto:findingjobs@HOTMAIL.COM]
>Sent: Thursday, July 29, 2004 1:41 PM
>I'd like SAS to round my variables to the nearest integer.
>I read in the SAS help that the statment "proc print round (X, 1)" can
>round the numbers. However, I get an error message when I do this.
>I also tried using "proc means maxdec = 1" but this also does not do
>Can anyone help me?