Chapter Contents

Previous

Next
The PRINT Procedure

Example 4: Summing Numeric Variables with One BY Group


Procedure features:
PROC PRINT statement options:
N=
BY statement
SUM statement
Other features:
SORT procedure
TITLE statement
#BYVAL specification
SAS system options :
BYLINE
NOBYLINE
Data set: EXPREV

This example





Program
 Note about code
options nodate pageno=1 linesize=70 pagesize=60 nobyline;


 Note about code
proc sort data=exprev;
   by region;
run;
 Note about code
proc print data=exprev noobs 
           n='Number of observations for the state: '
             'Number of observations for the data set: ';





 Note about code
   sum expenses revenues;
   by region;





 Note about code
   format revenues expenses comma10.;
 Note about code
   title 'Revenue and Expense Totals for the 
#byval(region) Region';
run;



 Note about code
options byline;


Output
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.