I have a proc means statement that is coded like this:
proc means sum data = final missing;
class table;
var claim;
run;
I am trying to export the results to Excel and I changed it to:
proc means sum data = final noprint;
class table;
var claim;
output out=summary;
run;
proc export data = summary replace;
dbms=excel;
outfile=&output;
sheet=summary;
It does process the export but it does not process what is actually the means. It should export the following:
The SAS System 17:44 Monday, February 18, 2013 1
The MEANS Procedure
Analysis Variable : Claims
TABLE N Obs Sum
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
24680 14096.00
CARDIAC-1B 10953 5998.00
CARDIAC-OTHR 521 258.0000000
NEURO 3334 1781.00
ORTHO-OTHR 482 235.0000000
ORTHO/JOINT 16947 11384.00
ORTHO/SPINE 8472 5116.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
But it is the export looks like this:
TABLE | _TYPE_ | _FREQ_ | CLMCNT |
0 | 40709 | 1.263942 | |
CARDIAC-1B | 1 | 10953 | 1.134481 |
CARDIAC-OTHR | 1 | 521 | 1.007813 |
NEURO | 1 | 3334 | 1.083993 |
ORTHO-OTHR | 1 | 482 | 1.021739 |
ORTHO/JOINT | 1 | 16947 | 1.395098 |
ORTHO/SPINE | 1 | 8472 | 1.271688 |
Help?
Your output statement should be more specific
output out=summary sum=Sum;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.