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). 

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;

    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.

  • About this blog

    I’m Maggie Miller and I’ll be providing you the latest updates about SAS books, documentation, tips and industry trends here on the SAS Bookshelf. Follow along with my talented colleagues, and guest posters as we bring the written word to life and share helpful content with our fellow SAS book enthusiasts.
  • Subscribe to this blog

    Enter your email address:

    Other subscription options

  • Archives