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" ;While this looks fairly simple - and it is - there are three key points that you must remember.
SAS programming statements
Run;
ODS PDF CLOSE ;
Run ;
- You need to have a run statement both before and after the ODS PDF CLOSE; statement.
- The file name must be correctly specified and it must be in quotes.
- You must have write access to the directory where you are trying to save the file.
Ods pdf file = "c:\temp\pdfexample.pdf" ;To create an HTML file, use the statements below:
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 ;
ODS HTML FILE = "complete filename" ;To create an RTF file, use these statements below:
SAS programming statements
Run;
ODS HTML CLOSE ;
Run ;
ODS RT FILE = "complete filename" ;
SAS programming statements
Run;
ODS RTF CLOSE ;
Run ;
Last updated:
September 24, 2008