Bringing SAS ODS Output to the Web
The SAS® System gives you the ability to create a wide range of web-ready reports. This paper walks through a series of examples showing what you can do with Base SAS and when you need SAS/IntrNet. Starting with the simplest HTML reports, this paper shows how you can jazz up your output by using the STYLE= options, traffic-lighting and hyper-linking available in the reporting procedures: PRINT, REPORT, and TABULATE. With the use of SAS/IntrNet you can add functionality to reports with features such as drill-down links that are data-driven, and you can produce dynamic reports created on-the-fly for individual users. Using this technique, your clients can navigate to the exact information needed to fulfill your business objective.
SAS ODS Overview
In the SAS System, both the Output Delivery System (ODS) and SAS/IntrNet produce documents for viewing over the Internet. All SAS users have ODS because it is part of Base SAS, but SAS/IntrNet is a separate product which you must have installed in addition to Base SAS.
If all you want to do is produce reports and post them on the Internet for people to view, then you probably don't need SAS/IntrNet. With a few ODS statements you can send any SAS output to the HTML (Hyper Text Markup Language) destination. You can also change the way HTML output looks by choosing one of the built-in style definitions that comes with Base SAS, or creating your own style definition using the TEMPLATE procedure. (Unfortunately, we don't have room to cover PROC TEMPLATE in this paper. For more information on PROC TEMPLATE or ODS basic concepts, see Slaughter and Delwiche (2001).) Using the STYLE= option in the TABULATE, REPORT, and PRINT procedures, you can change the color, font, and many other features of reports. You can even insert images and hyperlinks.
Using ODS to insert hyperlinks, you can create a pseudo-dynamic effect. When a person clicks on one of these hyperlinks, the browser takes them to a new page. While this has a dynamic feel, the new page is in fact static because you have created it in advance. To create truly dynamic reports, you need SAS/IntrNet.
With SAS/IntrNet you can create reports on the fly, based on the needs of individual users. The advantage of combining SAS/IntrNet with your ODS programs is that your program is dynamically executed when the user clicks on your hyperlink. This means that if your data is changing, the drill-down will capture the most up-to-date results. If your reports are not time dependent, the static approaches of generating HTML reports with ODS will suffice. However, if your report helps decision makers decide upon time-sensitive information, the marriage of ODS and SAS/IntrNet is the perfect solution.
Basic Table
For the first part of this paper we will be using basically the same table produced from PROC TABULATE to show you how you can use ODS and the various STYLE options to modify the look of the table. Here are the SAS statements that produce this basic table and the listing output is shown in Table 2.
PROC
VALUE $flav
'P' = 'Pecan Pie'
'B' = 'Banana Bash'
'A' = 'Apple Spice'
'M' = 'Mango'
'C' = 'Choco Mint';
TITLE 'Jelly Bean Production in 2001';
TITLE2 'Millions of Pounds';
run;
PROC
TABULATE DATA=production FORMAT=4.1;CLASS Factory Flavor;
VAR MPounds;
FORMAT Flavor $flav.;
TABLE Flavor ALL,
Factory*SUM=''*MPounds=''
ALL*SUM=''*MPounds='';
RUN;complete paper found at "ODS Meets SAS/IntrNet?", related CDISC Software and CDISC Standards...
Comments
Post a Comment