University of Southern California

ITS Information Technology Services

A division of the Office of the Chief Information Officer

The Output Delivery System

The Output Delivery System, abbreviated "ODS", is a feature of SAS that lets you send any output to a pdf, html or rtf file. The format is extremely simple. To send SAS output to a pdf file, use the statements below:

ODS PDF FILE = "complete filename" ;
SAS programming statements
Run;
ODS PDF CLOSE ;
Run ;

While this looks fairly simple - and it is - there are three key points that you must remember.
  1. You need to have a run statement both before and after the ODS PDF CLOSE; statement.
  2. The file name must be correctly specified and it must be in quotes.
  3. You must have write access to the directory where you are trying to save the file.

Usually when someone calls the Customer Support System about a problem with ODS, one of those three problems is occurring. The following example assumes you are using SAS on a Windows operating system. (Unix documentation coming soon.)

Ods pdf file = "c:\temp\pdfexample.pdf" ;
proc print data= tribalmembers (obs=6) split = " " ;
id tribe ;
var age gender homeComputer HomeInternet Yrs_educ ;
Label
HomeComputer = "Home Computer Access"
HomeInternet = "Home Internet Access"
Tribe = "Tribal Enrollment"
Yrs_educ = "Years of Education" ;
Run;
Ods pdf close ;
Run ;

To create an HTML file, use the statements below:

ODS HTML FILE = "complete filename" ;
SAS programming statements
Run;
ODS HTML CLOSE ;
Run ;

To create an RTF file, use these statements below:

ODS RT FILE = "complete filename" ;
SAS programming statements
Run;
ODS RTF CLOSE ;
Run ;

Last updated:
September 24, 2008

SAS

The use of all USC computing resources is governed by the USC Computing Policies.