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

The following output illustrates the simplest type of report that you can produce. The statements that produce the output follow. Selecting Variables to Print creates the data set EXPREV.
options obs=10;
proc print data=exprev;
run;
The First Ten Observations of the Data Set EXPREV

Customized Report

The following HTML report is a customized report that is produced by PROC PRINT using ODS. The statements that create this report do the following:
  • 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.
Customized Report Produced by PROC PRINT Using ODS
Customized Report Produced by PROC PRINT Using ODS