BookmarkSubscribeRSS Feed
SASsusrik
Fluorite | Level 6

Hello

I am learning about proc print tabulate and report procedures. 

Though all of them at the outset seem to be presenting data , I am wondering why there are three ways to do it (perhaps more but currently I am aware of these 3). I mean where would one prefer to use one over the other. Any writeup that compares/contrasts them would really help me. TIA!!!

5 REPLIES 5
MarkusWeick
Barite | Level 11

Hi @SASsusrik,

have a look at

"The Battle of the Titans (Part II): PROC REPORT versus PROC TABULATE" (https://www.lexjansen.com/pharmasug/2023/SD/PharmaSUG-2023-SD-082.pdf) and

"The Workhorses of Customized Report Writing – PROC TABULATE and PROC REPORT" (https://www.lexjansen.com/scsug/2004/Buck%20-%20PROC%20REPORT%20and%20PROC%20TABULATE.pdf).

Maybe you find them helpful.

 

 

 

Please help to keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
Ksharp
Super User
@Cynthia_sas could give you more detail information.

PROC PRINT is just plaint printing a report/table , nothing can do on it .
PROC TABULATE is for describe statistical, if you just want get some statistics like mean,sum,frequency ..... with table, you could use it. It would not used too much as to my experience.
PROC REPORT could get you detail and summarize report . a.k.a it is like a combination of PROC PRINT and PROC TABULATE. It is most useful and usage in real life.
ballardw
Super User

I am going to add a bit to @Ksharp's summary.

Proc print doesn't calculate anything except sums.

 

Proc tabulate only displays numeric values in the body of the report (not page, row or column headers) though an applied format can show text for the numeric values. Proc tabulate is easier to get nesting of values in both row and column dimensions. Also Proc Tabulate with care can have the statistics of multiple variables in the same column (as long as the stats requested are the same).

 

Proc report allows custom calculations and conditional behavior based on the result of other cells in the report.

 

There are reasons that SAS has separate books for examples of Proc Report and Tabulate and many papers have been written about them for specific applications. They have been around for about 50 years.

SASsusrik
Fluorite | Level 6

Wow, didnt knwo it is that big a thing that books have been authored on the same. Will try to look up. TY!

Do you know of any papers/ books that show examples of comparinc contrasting each one's usage and functions. That will be super helpful to understand the limitations or usages so to speak. TY!

Cynthia_sas
Diamond | Level 26
Hi:
I had a table of comparisons in the Creating Complex Reports paper https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/173-2008.pdf on page 7. Several of the papers already mentioned discuss differences.
Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 179 views
  • 7 likes
  • 5 in conversation