A mockup of data x is below. I am trying to suppress the observations in the output so sum values print for A, B and C. If I use noobs after proc print the obs. record number is suppressed but the list of obs. still posts.
I am just looking for sums.
I would like to generate
sum A = 41
sum B = 45
sum C = ..
proc means data= x ;
class a ;
var b ;
output sum= out= x_summary ;
then choose what to do with the summary totals in data set x_summary.
Output data set x_summary will hold the total value of B for each value of A.
The variables will be:
B (being the sum of B within A )
_freq_ (the number of rows in X for the current value of A)
_type_ (=0 for overall total and 1 for the total lines of each A)
better documentation can be found at http://support.sas.com/documentation/cdl/en/allprodsproc/63875/HTML/default/a003135046.htm#a00314568...
It seems to me that you do not want a DETAIL report (where you see 1 report row for every observation in the original input data). You describe a SUMMARY report (where every report row represents the information for a group of observations).
SAS has many, many summary-level procedures: PROC SQL, PROC MEANS, PROC TABULATE, PROC REPORT.
Depending on what you want to do (generate output dataset or generate an HTML, RTF or PDF report), you might try starting with PROC MEANS and then graduate to TABULATE or REPORT if MEANS isn't what you want.
ods html file='c:\temp\examp_means.html' style=sasweb;
proc means data=x sum maxdec=0;
var a b;
ods html close;