Hi:
The > in your code is causing your code not to post correctly. As previously recommended, this posting explains how to use > as the way to show >, and [pre] and [/pre] to surround your code.
http://support.sas.com/forums/thread.jspa?messageID=27609毙
But, if you are willing to read some user group papers on PROC TABULATE, the TABLE statement needed to achieve your report is fairly straightforward.
http://www2.sas.com/proceedings/sugi30/243-30.pdf
http://www.ats.ucla.edu/stat/SAS/faq/tabulate.htm
http://www2.sas.com/proceedings/sugi30/258-30.pdf
I generally recommend that you draw a little picture of what you want your output table to look like, because, when you're starting out, that helps you decide which variables go in ROW versus COL dimensions in the TABLE statement. The model syntax for PROC TABULATE is shown below using SASHELP.SHOES:
[pre]
proc tabulate data=sashelp.shoes;
class region product;
var sales;
table region all,
product*sales*mean;
run;
[/pre]
which "translates" to:
[pre]
proc tabulate data=
dataset;
class
classvar (or list multiple);
var
analysis_var (or list multiple);
table
row_dimension,
column_dimension;
run;
[/pre]
For this PROC TABULATE, REGION and PRODUCT are going to set the groups and SALES will be used for analysis. REGION will be in the ROW dimension and PRODUCT will be in the COL dimension. The statistic that I will get for PRODUCT is the average sales for each product. If, on the other hand, I wanted a simple count of sales, then either of these programs would produce that number, depending on whether I wanted to actually count the number of SALES (the first example) or the number of observations for each product (the second examle). In some instances, the two tabulates could give the same results, in other instances, they might give different results (depending on your data):
[pre]
proc tabulate data=sashelp.shoes f=comma6.;
class region product;
var sales;
table region all,
product*sales*n;
run;
proc tabulate data=sashelp.shoes f=comma6.;
class region product;
table region all,
product*n;
run;
[/pre]
It is going to be impossible for you to learn how to use PROC TABULATE effectively without reading about how the CLASS, VAR and TABLE statements need to work together.
cynthia