SAS Print
Usage
To print the first 10 observations, try:
proc print data=LIBREF.TABLE(obs=10); var VARLIST; run;
To print all observations meeting some condition, try:
proc print data=LIBREF.TABLE noobs; var VARLIST; where EXPR; run;
By Statement
The BY statement specifies one or more variables for which the PROC PRINT should be split.
The dataset must be presorted by the BY variables. If it is not, specify the NOTSORTED option.
If the data is sorted descending by any variable on the statement, include the DESCENDING keyword directly after that variable name.
Sum Statement
The SUM statement creates a total of the specified variable.
If there is also a BY statement, a total is also created for each BY group that contains more than one observation.
To create higher-level variables, try:
proc print data=LIBREF.TABLE noobs; by Region; sum Sales; run;
SumBy Statement
The SUMBY statement specifies a subset of the variables specified on the BY statement. The totals created by the SUM statement are restricted to this subset.