Chapter Contents

Previous

Next
The TABULATE Procedure

Example 3: Using Preloaded Formats with Class Variables


Procedure features:
PROC TABULATE statement option:
OUT=
CLASS statement options:
EXCLUSIVE
PRELOADFMT
TABLE statement option:
PRINTMISS
Other features: PRINT procedure
Data set: ENERGY
Formats: REGFMT., DIVFMT., and USETYPE.

This example




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 / preloadfmt;
   var expenditures;
 Note about code
   table region*division,
         type*expenditures / rts=25 printmiss;
 Note about code
   format region regfmt. division divfmt. type usetype.;
   title 'Energy Expenditures for Each Region';
   title2 '(millions of dollars)';
run;
 Note about code

proc tabulate data=energy format=dollar12. out=tabdata;
 Note about code
   class region division type / preloadfmt exclusive;
   var expenditures;
 Note about code
   table region*division,
         type*expenditures / rts=25;
 Note about code
   format region regfmt. division divfmt. type usetype.;
   title 'Energy Expenditures for Each Region';
   title2 '(millions of dollars)';
run;
 Note about code

proc print data=tabdata;
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.