A SAS Global Forum paper by Darylene Hecht, “PROC PRINT and ODS: Teaching an Old PROC New Tricks” provides a lightweight introduction to the new SAS 9.3 PRINT procedure. The paper was written months before SAS 9.3 was released, so some of the look and feel changed slightly, but you still get an idea of how much changed in the procedure.
With SAS 9.3, it’s pretty clear that SAS wants everyone to start using HTML as their base output format. That’s actually been a good idea since SAS 9 was first released. HTML output is easier to read, takes less paper if you print it, and is easier to deliver to the world or to integrate into other documents than the “print file,” the paginated monospace text of the Listing destination format that SAS relied on for the previous four decades. And though HTML might seem more complicated than Listing, it’s not actually any harder to create. You will find a series of changes in SAS 9.3 that make the transition easier.
- HTML is now the default destination if you are running SAS in the GUI windowing environment. That is, you don’t have to use any ODS statements to get HTML output.
- ODS graphics have been separated from SAS/GRAPH and moved entirely to base SAS. ODS graphics are now included in your HTML output with just a base SAS license. If you use the Listing destination, you can still use ODS graphics, but you have to look at the graphics separately, an approach we will all quickly come to see as an unnecessary inconvenience.
- There are improvements in the DOCUMENT procedure to make it more compatible with the PRINT procedure, and to allow arbitrary text to be added to a document. These changes are especially useful if you are using the DOCUMENT procedure for formatted output such as HTML output.
- There was a sense that ODS style attributes were converging with CSS attributes when SAS 9 was released, and that continues with several new ODS style attributes in SAS 9.3. The new attributes such as WHITESPACE, PADDING, and BORDERCOLLAPSE provide ODS support for attributes that you would take for granted in CSS formatting of an HTML document.
- There is a new style, HTMLBlue, that enhances readability and makes more efficient use of space when displaying tables. It also, in my opinion, just looks more glamorous in a graphic design sense. The HTMLBlue style is the default style for the HTML destination in SAS 9.3.
There are two tricky points with HTML being the default destination. First, if you were already running a program in SAS 9.2, you may want to keep its output style the same as before. There are three new system options that, used together, can provide the SAS 9.2 behavior, so that you don’t have to rewrite your programs to keep them from changing.
Second, while HTML is the default destination in the GUI windowing environment, Listing remains the default in all other environments. This means the output format could change just because you run a program in a different way. If this is a problem, add ODS statements to the program to explicitly select the destination you want and close the destination you don’t want. This is not as big a change as it might sound. You can start a program with this statement to close all ODS destinations, without having to know which ones are open:
ods _all_ close;
Follow this with an ODS HTML, ODS LISTING, or other ODS statement to open the destination of your choice. This is all it takes to get consistent ODS output from a program, not affected by where you run it.
If you have older programs that use the PRINTTO procedure to select a destination file for output, you need to know that the PRINTTO procedure works only for the Listing destination, and not for any other ODS destination. Even for the Listing destination, it is simpler to select destination files using the ODS LISTING statement. However, continue to use the PRINTTO procedure if you use it to temporarily reroute the SAS log, or use it with the Listing destination to combine the log and output in the same file.
I have a problem getting PDF, HTML, and RTF output from the Output Delivery System (ODS). It asks me to connect to a remote browser. When I try that, I have a connection failure. I am using Base SAS 9.2 software. What am I doing wrong?
Dear Not Browsing,
It is funny that you should ask that question, as I just had another SAS programmer ask the same question this week!
The solution is to use the HELPBROWSER SAS system option. You can either add this OPTIONS statement at the beginning of your SAS code containing ODS statements:
options helpbrowser = sas;
or you can add this line to your sasv9.cfg file (for Windows and UNIX) or your sas.exe invocation:
The HELPBROWSER SAS system option specifies the browser to use for SAS Help and ODS output. The valid values are as follows:
REMOTE specifies to use the remote browser for the Help. The location of the remote browser is determined by the HELPHOST and the HELPPORT system options. This is the default value for the OpenVMS, UNIX, z/OS, and Windows 64-bit operating environments.
SAS specifies to use the SAS browser for the Help. This is the default for the Windows 32-bit operating environment.
To see the current value of this option, submit the following SAS code:
proc options option=helpbrowser value;
This option has been available since SAS 9.0, so I suspect people are running into it now when moving to a 64-bit Windows system, as the default value is different.
I hope this helps you see your ODS output. Happy SAS programming!
Miss SAS Answers