Maggie
Maggie

Reputation: 101

Tell SAS not to produce scientific notation

outputSAS returns sci-notation in proc means sum output which I can't use for further rate calculation procedures. How to suppress SAS to produce sci-notation, any idea? Thanks in advance.

"There's a prob solved similar but not quite applicable to this very case. I apologize if I missed correct way to modify that answer though".

data non.test;
input year racecat outcome grand_total;
datalines; 
1995    1   1585    9988998
1995    2   268     9966565
1996    2   1574    5569885
1996    2   230     2366558
1997    1   1482    3366998
;
run; 

proc sort data=non.test;
by year racecat;
proc means data=non.test noprint;
 var outcome grand_total;
 class year racecat;
 output out=non.test(where=(year ne . and racecat ne .) drop=_type_ _freq_)
              sum(outcome) = by_outc
              sum(grand_total)=Grand_total;
run;

rate is not calculate

Upvotes: 3

Views: 20115

Answers (1)

Tom
Tom

Reputation: 51566

If you want to see the values display in a different format than the default BEST12. then change it with a FORMAT statement.

proc print data=non.test ;
  format grand_total comma20.;
run;

If you assign the format in the initial dataset then PROC MEANS will also assign it to the derived field in the output dataset.

Upvotes: 4

Related Questions