Generating Column Totals

The SUM Statement

To produce column totals for numeric variables, you can list the variables to be summed in a SUM statement in your PROC PRINT step.
Syntax, SUM statement:
SUM variable(s);
variable(s) is one or more numeric variable names, separated by blanks.
The SUM statement in the following PROC PRINT step requests column totals for the variable BalanceDue:
proc print data=cert.insure; 
  var name policy balancedue; 
  where pctinsured < 100;  
  sum balancedue; 
run;
Column totals appear at the end of the report in the same format as the values of the variables.
Figure 6.11 Column Totals
Column Totals
Note: If you specify ...

Get SAS Certified Specialist Prep Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.