SAS author's tip: debugging with the LIST option


This week's tip comes from SAS powerhouse Art Carpenter and his book Carpenter's Complete Guide to the SAS REPORT Procedure. SAS user Kim LeBouton called this book "the single best resource for PROC REPORT." And in his review, SAS user Charles Patridge said "This is a must-have book if you are a SAS user--period--no matter what level SAS user you are!" You can read more reviews here.

Most of you are probably very familiar with Art and his work. If you haven't consulted one of his books yet, you may have heard him speak at conferences or connected with him online. He's a busy guy! We're so happy that Art continues to publish with us.

To learn more about Art and his latest book  Carpenter’s Guide to Innovative SAS Techniques or to view a free chapter from any of his books, visit his author page.

The following excerpt is from SAS Press author Art Carpenter and his book "Carpenter's Complete Guide to the SAS REPORT Procedure" Copyright © 2007, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software)

6.5.3 Debugging with the LIST Option

The LIST option can be used to expand the PROC REPORT step in the SAS log. The expansion includes the statements and options that have been left at defaults. The following simple PROC REPORT step has three variables on the COLUMN statement, but only two DEFINE statements. The output is directed only to the LISTING destination, and the programmer might want to know which options are being applied as defaults.

title1 'Using Proc REPORT';
title2 'Using the LIST Option';
proc report data=rptdata.clinics
list nowd;
column region ht wt;
define region / group;
define ht / analysis mean 'HEIGHT';

Since the LIST option has been specified, the SAS log includes the following expanded PROC REPORT step code (the line breaks and code alignments are mine). The expanded code includes a DEFINE statement for WT.





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.

Related Posts

Comments are closed.

Back to Top