Chapter Contents

Previous

Next
The TABULATE Procedure

Example 9: Creating Multipage Tables


Procedure features:
TABLE statement
ALL class variable
BOX=
CONDENSE
INDENT=
page expression
Data set: ENERGY
Formats: REGFMT., DIVFMT., and USETYPE.

This example creates a separate table for each region and one table for all regions. By default, PROC TABULATE creates each table on a separate page, but the CONDENSE option places them all on the same page.


Program
 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
proc tabulate data=energy format=dollar12.;
 Note about code
   class region division type;
   var expenditures;
 Note about code
   table region='Region: ' all='All Regions',


 Note about code
   division all='All Divisions',

 Note about code
         type='Customer Base'*expenditures=' '*sum=' '









 Note about code
         / rts=25 box=_page_ condense indent=1;






 Note about code
   format region regfmt. division divfmt. type usetype.;
   title 'Energy Expenditures for Each Region and All Regions';
   title2 '(millions of dollars)';
run;


Output
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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