BookmarkSubscribeRSS Feed
DarknessFalls
Calcite | Level 5
I'm running a proc report which produce around 20000 rows of output and with 75 columns.

The 1st 3 columns are group variables and I have 2 rows @ the top with across variables for more grouping.

The other columns only have integers which are calculated in another datastep.

This report takes about 1 minute to run, but I'll be running a few thousand scenarios of it so I was wondering if there are tools to improve the efficiency of the report procedure.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
I don't understand this description:
"I'm running a proc report which produce around 20000 rows of output and with 75 columns. The 1st 3 columns are group variables and I have 2 rows @ the top with across variables for more grouping."


What does your data look like? What is your destination of interest? Is this a cross-tabular table? What features of PROC REPORT are you using. You say you are running a DATA step to get "integers" for calculation -- could this DATA step be eliminated if you used one of the statistics like N???

Since you are using GROUP and ACROSS items, this must be a summary report. When you say your report has 75 columns, does that mean that your ACROSS variables have 75 unique variables??? Or that your DATASET has 75 columns or variables???

Also, I don't understand the "2 rows @ the top with ACROSS variables" -- this sounds like you might have 2 or more variables nested??

If you are not using PROC REPORT special features like the LINE statement or the COMPUTE block, you might benchmark creating your crosstabular report with TABULATE instead of REPORT. Both TABULATE and REPORT produce almost the same set of statistics -- but TABULATE has a few more percent related statistics.

For example, in the report shown below, using either PROC REPORT or PROC TABULATE, the finished report has 19 report columns, but I am only using 6 dataset columns or variables to create the reports.

In my simple benchmark of 1440 observations, the results were in favor of PROC REPORT -- but you would really have to test out such a benchmark with your data and your particular PROC REPORT step to the equivalent PROC TABULATE step. And, of course, if you are using PROC REPORT special features like LINE, COMPUTE or CALL DEFINE, then there is no equivalent feature in PROC TABULATE.
[pre]
NOTE: There were 1440 observations read from the data set SASHELP.PRDSALE.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.06 seconds
cpu time 0.04 seconds


NOTE: There were 1440 observations read from the data set SASHELP.PRDSALE.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.09 seconds
cpu time 0.06 seconds

[/pre]

cynthia
[pre]
ods listing close;
ods html file='c:\temp\compare.html' style=sasweb;

proc report data=sashelp.prdsale nowd;
column country region division year,quarter,(actual actual=actavg);
define country / group;
define region / group;
define division / group;
define year / across;
define quarter / across;
define actual / sum 'Sum';
define actavg / mean 'Mean';
run;

proc tabulate data=sashelp.prdsale;
class country region division year quarter;
var actual;
table country*region*division,
year*quarter*actual*(sum mean);
run;

ods html close;
[/pre]

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 773 views
  • 0 likes
  • 2 in conversation