04-03-2012 12:55 PM
PROC MEANS DATA=final_row NWAY ;
CLASS mco agegroup gender RiskGroup ;
/* VAR metric ;*/
OUTPUT OUT=final N=cnt ;
by commenting out the var statement there is no output dataset created.But how to create an outputdataset
04-03-2012 04:41 PM
Tested on one of my data set and working fine
PROC MEANS DATA = TMP39 NWAY;
OUTPUT OUT=FINAL N=CNT ;
PROC PRINT DATA = WORK.FINAL;
NOTE: There were XXXXX observations read from the data set TMP39.
NOTE: The data set WORK.FINAL has 2 observations and 4 variables.
NOTE: Compressing data set WORK.FINAL increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The PROCEDURE MEANS printed pages 45-56.
NOTE: PROCEDURE MEANS used (Total process time):
real time 40.04 seconds
user cpu time 25.06 seconds
system cpu time 1.20 seconds
OS Memory 9508k
Timestamp 4/03/2012 3:40:09 PM
Page Faults 0
Page Reclaims 314
Page Swaps 0
Voluntary Context Switches 3500
Involuntary Context Switches 990
Block Input Operations 0
Block Output Operations 0
04-03-2012 05:04 PM
proc means data=sashelp.class nway noprint;
class sex age;
output out=final n= /autoname;
Works for me as well. If you just want a count though, could use proc freq.
proc freq data=final_row noprint;