LISTING vs. HTML output in SAS: Confessions of an HTML convert

11

Last week I presented two talks at the University of Wisconsin at Milwaukee, which has established a new Graduate Certificate in Applied Data Analysis Using SAS. While in Milwaukee, I ran into an old friend: the ODS LISTING destination.

One of my presentations was a hands-on workshop titled Getting Started with the SAS/IML Language. In the UW-M computer lab, the students used SAS/IML Studio to run the exercises. I noticed that the student output was produced in the ODS LISTING destination, whereas my laptop was generating output for the HTML destination. That is, in the following screen capture, I was generating the output on the right side, whereas the student output looked like the left side (click to enlarge the image):

As I wandered through the lab, watching the students complete the exercises, I realized that I have grown accustomed to the HTML destination. HTML became the default ODS destination for the SAS Windowing environment in SAS 9.3. SAS/IML Studio made HTML the default destination in SAS 9.3m2, which shipped in August 2012. Thus I have been seeing HTML output exclusively for about a year.

I now prefer the HTML output, but when SAS 9.3 changed the default destination from LISTING to HTML, I had mixed feelings. The LISTING destination was an old friend, and I didn't want to see it move away. We had had good times together through the years.

However, I embraced the change. I did not override the new default when I installed SAS 9.3, and I gritted through the first few weeks of working with the HTML output. I discovered several benefits to the HTML destination, including the fact that that HTML output is "infinitely wide," and is therefore valuable when working with large matrices or wide tables. No more worrying about matrices wrapping when the output is wider than the LINESIZE option!

As I looked at the student output in the computer lab, I realized that I have made a new friend: the HTML destination. I like having it around when I work. I enjoy its beautiful tables and its integrated and interlaced ODS graphics.

When I encountered my old friend, the LISTING destination, in Milwaukee, I got the same feeling that I get when I play a classic video game like Pong, Space Invaders, or Asteroids: I briefly enjoy the nostalgic experience, but I realize that newer technology makes for a more enjoyable overall experience.

What is your default ODS destination in SAS? Are you still clinging to the LISTING destination? Have you converted to using HTML output? Why or why not? Share your story in the comments.

Share

About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.

11 Comments

  1. Nice to hear of your recent encounter with your old friend. It's been some time since I've had the privilege as I prefer using SAS Enterprise Guide as my coding interface these days and the SAS report default output type. Occasionally I'll code a different ODS destination such as excelXP Tagsets within Enterprise Guide.

  2. Mike Carniello on

    I was intrigued by the title, and read the first paragraph quickly - too quickly! I thought I read:

    "I ran into an old friend: the DOS LISTING destination."

    Now THAT would have been an interesting post! (and a really old friend!)

    Still an interesting observation, though. Myself, I prefer a PDF target (used in EG), so that I can export out to something mail-able (I do mostly quick and dirty summaries, or point out dataset anomalies).

  3. When I use Enterprise Guide the first thing I do is usually change the options to use rtf because it's easiest to copy-paste into doc files to share with non-SAS users. When using base SAS, I usually just leave it at the default on the machine when I sat down at it.

  4. I keep the LISTING going for cut & paste. Try to extract a single column from an HTML table with alt-drag. It's useless. If I want wide and long pages, I adjust the options, just like we all did back in the day. HTML is real pretty, though.

    SAS 9.3 (TS1M2) HTML also chokes on large files and goes into a permanent wait state, while the listing says, basically, "That's a lot of output, what do you want to do with it." (It seems the HTML was not stress tested, doesn't it?)

    BTW, how does one stop and start the HTML destination when you want to APPEND results to an existing HTML file? This happens when I test code. I'd like to test a chunk of code with HTML off and then turn it on when it "looks right". At the moment, I am reinventing make, clumsily, with run lists.

    HTML sure is pretty, though.

      • Rick,
        Thanks, that's a great tip!

        Any hints on the single column cut and paste? As an example, I have an Proc Contents HTML output and want to cut out subsets of the variable names for use in a DATA step arrays. The source dsn is an SPSS data set, so I need to rename and regularize different subsets of the variables. At the moment my renaming workflow involves cutting and pasting into emacs or excel to create the statements I wish to use and then cutting and pasting back into SAS. I'd really like something similar to a cntlin data set for metadata.

        Thanks
        Bill

        • Rick Wicklin

          On my version of PC SAS, when I right-click on an HTML table, I get an option to "Export to Microsoft Excel." Select that option brings up the table in a spreadsheet. You can then select a column. Not perfect, but maybe easier than going to emacs?

          Of course, the easiest way is to get the var names is to use the SHORT option:
          proc contents data=sashelp.class SHORT;
          run;

          • Rick,
            Thanks again. I tried the export to excel when clicking on a blank area and that just opened a web query. Not what I was looking for. However I also tried right clicking on a table and that worked just fine.

            The SHORT option is not helpful when the names are nonsense ( Keys to a questionnaire e.g. R1_AA) and all the info is in the labels.

            Bill

  5. Robert Allison

    I create mostly SAS/Graph output, and I set up almost all my jobs to run in batch mode, and have been using "ods html" almost exclusively for many years. I was glad to see the DMS SAS default recently change to ods html, as that makes my interactive DMS graph output very similar to my batch-job output.

    One thing that I really like about html is that I can have html hover text (alt or title tags) on the pieces of the graph (bar segments, plot markers, map areas, etc) so I can hover my mouse over them and see the data values -- this helps a lot in verifying that the graph is representing the data the way I intended.

  6. Pingback: Arrange matrices and graphs in a gridded layout - The DO Loop

Leave A Reply

Back to Top