Chapter 35: The PRINT Procedure


Overview: PRINT Procedure

What Does the PRINT Procedure Do?

The PRINT procedure prints the observations in a SAS data set, using all or some of the variables . You can create a variety of reports ranging from a simple listing to a highly customized report that groups the data and calculates totals and subtotals for numeric variables.

Simple Listing Report

Output 35.1 illustrates the simplest kind of report that you can produce. The statements that produce the output follow. Example 1 on page 739 creates the data set EXPREV.

 options nodate pageno=1 linesize=64 pagesize=60;  proc print data=exprev;  run; 
Output 35.1: Simple Listing Report Produced with PROC PRINT
start example
 The SAS System                            1  Obs    Region    State     Month    Expenses    Revenues   1    Southern    GA       JAN95      2000         8000   2    Southern    GA       FEB95      1200         6000   3    Southern    FL       FEB95      8500        11000   4    Northern    NY       FEB95      3000         4000   5    Northern    NY       MAR95      6000         5000   6    Southern    FL       MAR95      9800        13500   7    Northern    MA       MAR95      1500         1000 
end example
 

Customized Report

The following HTML report is a customized report that is produced by PROC PRINT using ODS. The statements that create this report

  • create HTML output

  • customize the appearance of the report

  • customize the title and the column headings

  • place dollar signs and commas in numeric output

  • selectively include and control the order of variables in the report

  • group the data by JobCode

  • sum the values for Salary for each job code and for all job codes.

For an explanation of the program that produces this report, see Program: Creating an HTML Report with the STYLE Option on page 780.

click to expand
Display 35.1: Customized Report Produced by PROC PRINT Using ODS



Base SAS 9.1.3 Procedures Guide (Vol. 2)
Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4
ISBN: 1590472047
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net