Sample 24844: Web-enabling Your SAS Output
Here's a tip that will not only make your procedure output look great, but will permit your output to be Web-ready with syntax-correct HTML code.
The Output Delivery System (ODS) in Versions 7 and 8 of the SAS System controls the formatting of all procedure output. ODS provides added control for users to create customized procedure output, generate "master" templates, produce output as two objects (a data component and a template component), and generate output as HTML code to simplify Web-enablement.
With the popularity of the Internet, you may find it useful to deploy selected pieces of output on your Web site. ODS makes deploying procedure output to the Web a simple and painless process. Syntactically-correct HTML code is automatically produced and ready for you to deploy using your Internet browser's software. Use the following ODS statement syntax:
ODS html body = 'user-defined-html-file-name';
<SAS procedure code>;
ODS html close;
For example, if you want to generate HTML code on a SAS table using the UNIVARIATE procedure, all you have to do is surround your procedure code with the following ODS statements:
ODS html body = 'user-defined-html-file-name' ;
PROC UNIVARIATE DATA=movies ;
TITLE1 'ODS HTML UNIVARIATE Procedure Output' ;
RUN ;
ODS html close;
In the first line 'user-defined-html-file-name' is the user-designated location and file name given to the HTML output file, such as 'c:\ods-univariate.html '. The HTML code and output will reside in this file.
This sample is from Kirk Paul Lafler, Senior Consultant and founder of Software Intelligence Corp., a SAS Institute Quality Partner organization in Spring Valley, California.
Lafler has 22 years of SAS programming and training experience, and is active in several
SAS users groups.
If you have a SAS tip you'd like to share, send it to techeditor@sas.com.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample shows how to easily create an HTML file that contains your procedure output.
| Type: | Sample |
| Topic: | Non SAS Authors ==> Kirk Paul Lafler SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2005-02-03 08:47:42 |
| Date Created: | 2004-10-19 11:52:43 |
Operating System and Release Information
| SAS System | Base SAS | All | n/a | n/a |