The REPORT Procedure |
When the DATA= input data set is stored as a table or view in a database management system (DBMS), the PROC REPORT procedure can use in-database processing to perform most of its work within the database. In-database processing can provide the advantages of faster processing and reduced data transfer between the database and SAS software.
PROC REPORT performs in-database processing by using SQL implicit pass-through. The procedure generates SQL queries that are based on the statements and the PROC REPORT options that are used as well as the output statistics that are specified in the procedure. The database executes these SQL queries and the results of the query are then transmitted to PROC REPORT. To examine the generated SQL, set the SASTRACE= option.
If the SAS format definitions have not been deployed in the database, the in-database aggregation occurs on the raw values, and the relevant formats are applied by SAS as the results' set is merged into the PROC REPORT internal structures. For more information, see the section "Deploying and Using SAS Formats" in SAS/ACCESS for Relational Databases: Reference.
In-database processing will not occur if the PROC REPORT step contains variables with usage types DISPLAY or ORDER.
The following statistics are supported for in-database processing: N, NMISS, MIN, MAX, MEAN, RANGE, SUM, SUMWGT, CSS, USS, VAR, STD, STDERR, and CV.
Weighting for in-database processing is supported only for N, NMISS, MIN, MAX, RANGE, SUM, SUMWGT, and MEAN.
The SQLGENERATION system option or LIBNAME statement option controls whether and how in-database procedures are run inside the database. By default, the in-database procedures are run inside the database when possible. There are many data set options that will prevent in-database processing. For a complete listing, refer to "Overview of In-Database Procedures" in SAS/ACCESS for Relational Databases: Reference.
For more information about in-database processing, see SAS/ACCESS for Relational Databases: Reference.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.