SAS author's tip: Using PROC MEANS to create a data set containing summary information


This week's SAS tip is from Ron Cody and his latest book Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them. Learn more about this esteemed user and his many bestselling SAS books--as well as get additional bonus content on his author page.

The following excerpt is from SAS Press author Ron Cody's book "Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them" Copyright © 2012, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software).






About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.


  1. Shelly Goodin
    Shelly Goodin on

    Hi Mike, thanks for pointing this out. The code is indeed correct in the book. Unfortunately, the original screen capture from the book in this post tweaked the formatting that appeared in the gray box. I have reposted a screen capture that retains the correct formatting. Thanks again.

  2. Hi. It's too bad that the UNDERSCORE does not appear in the variable names in the OUTPUT statement.
    "MEAN HR" should be "MEAN_HR" ... is it really like that in the book?

Back to Top