Date: Wed, 30 Apr 2008 19:32:35 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Thousands separator in Output
You can always output the statistics to a dataset, then proc print
with proper format (comma.). If you just want to output from proc means
with the format you want, then you have to use proc template to
change the table:
data have;
do i=1 to 100;
x=ranuni(2)*10000000;
output;
end;
run;
ods path work.myTmp(update) sashelp.tmplmst(read);
proc template;
edit base.summary;
define mean;
format=comma.;
end;
define max;
format=comma12.2;
end;
end;
run;
proc means data=have mean max;
var x;
run;
The MEANS Procedure
Analysis Variable : x
Mean Max
----------------------------
4,818,901 9,535,297.25
----------------------------
On Wed, 30 Apr 2008 16:11:49 -0700, STHB <StopTheHousingBailout@GMAIL.COM>
wrote:
>Is there a way to get SAS to put commas as a thousands separator in
>its output (e.g., when running PROC MEANS, get the output for Mean,
>Max, Sum, etc. to read as 5,000,000 rather than 5000000)?
|