SAS author's tip: Turning off output to the results window

Output Delivery SystemThis week's SAS tip is from Lauren Haworth, Cynthia L. Zender, and Michele Burlew's book Output Delivery System: The Basics and Beyond. This monumental guide is packed with a wide-array of techniques and examples. As SAS programmer Christine Iodice said, "This book is one-stop shopping for all your ODS needs!"

I hope you enjoy this week's featured book excerpt. If you'd like more information, visit our Web catalog to read reviews, the table of contents, and a free chapter. View previously featured tips from the book on this blog: Sending ODS output to your printer and Selecting variables to include in output.

The following excerpt is from SAS Press authors Lauren Haworth, Cynthia L. Zender, and Michele Burlew's book  "Output Delivery System: The Basics and Beyond" Copyright © 2009, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software). 


tags: cynthia zender, lauren haworth, michele burlew, ods, Output delivery system, sas author's tip, sas press

One Comment

  1. Posted April 1, 2013 at 7:47 am | Permalink

    The %DO loop in this example is inefficient because there is a lot of overhead involved in running a procedure multiple time. A more efficient approach is to sort the data by the PLANT variable and then run the following:

    ods graphics off; ods exclude all; ods noresults; /* turn off ODS output */

    ODS OUTPUT TTests=TTest;
    proc ttest data=product
    by plant;
    class product;
    var units;
    run;

    ods graphics on; ods exclude none; ods results; /* turn on ODS output */

    Notice also that I prefer ODS EXCLUDE, rather than closing the destination.
    For an explanation, see Simulation in SAS: The slow way or the BY way.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>