Procedure features: |
PROC
REPORT statement options:
|
DEFINE statement options:
| ANALYSIS |
| GROUP |
| NOPRINT |
| SUM | |
|
Other features: |
|
Data set: |
GROCERY
|
Formats: |
$MGRFMT.
|
This example uses WHERE processing as it builds an output data
set.
This technique enables you to do WHERE processing after you have consolidated
multiple observations into a single row.
The first PROC REPORT step creates a report (which it does not display)
in which each row represents all the observations from the input data set
for a single manager. The second PROC REPORT step builds a report from the
output data set. This report uses line-drawing characters to separate the
rows and columns.
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=64 pagesize=60
fmtsearch=(proclib);
| proc report data=grocery nowd
out=temp( where=(sales gt 1000) );
column manager sales; |
| define manager / group noprint;
define sales / analysis sum noprint;
run;
|
This is the output data set that PROC REPORT creates. It is used as
the input DATA step in the next PROC REPORT step.
|
|
|
| proc report data=temp box nowd;
column manager sales;
define manager / group format=$mgrfmt.;
define sales / analysis sum format=dollar11.2;
title 'Managers with Daily Sales';
title2 'of over';
title3 'One Thousand Dollars';
run; |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.