Download presentation
Presentation is loading. Please wait.
Published byCrystal Newton Modified over 9 years ago
1
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower 3-3155; miller@pop.psu.edu
2
ODS Purpose To allow more stylized / fancier output for SAS jobs, using HTML, PDF, RTF, or Postscript To eliminate the need for macros that used to convert standard SAS output to a Microsoft Word, WordPerfect, or HTML document
3
Standard SAS Output proc print data=leprechauns; run; proc means data=leprechauns; var height gold; run; ________________________________________________________
4
ODS HTML Output ods html body="D:\projects\workshops\SAS_ODS\leprechauns.html"; proc print data=leprechauns; run; proc means data=leprechauns; var height gold; run; ods html close;
5
SAS HTML Output (with frames)
6
ods html path="D:\projects\workshops\SAS_ODS\“/* output files path */ body="leprechauns_body.html" /* body */ contents="leprechauns_contents.html“ /* table of contents */ frame="leprechauns_frame.html" /* main webpage */ page="leprechauns_page.html“ /* table of pages */ base=“http://www.pop.psu.edu/~miller/”;/* URL prefix (optional) */ proc print data=leprechauns; run; proc means data=leprechauns; var height gold; run; ods html close;
7
SAS PDF Output ods pdf file="D:\projects\workshops\SAS_ODS\leprechauns.pdf"; proc print data=leprechauns; run; proc means data=leprechauns; var height gold; run; ods pdf close;
8
Other ODS formats available RTF (Rich Text Format) ods rtf file="D:\temp\leprechauns.rtf"; … ods rtf close; Postscript ods printer file=“D:\temp\leprechauns.ps”; … ods printer close; XML (Extensible Markup Language) ods xml file="D:\temp\leprechauns.xml"; … ods xml close; Latex ods latex path = "C:\temp" gpath = "C:\temp\ps" (url="ps/") style = Journal; ods graphics on;... ods graphics off; ods latex close;
9
Other ODS topics You can specify styles (colors, themes, etc.) by using the STYLE= option Get a list of all the tables that are generated: ods trace output; … ods trace off; You can select individual tables to include in the output. Look at the output of the trace, then add: ods select ; before your other ods statements. You can also customize the output using PROC TEMPLATE. You can output a table directly to a SAS dataset: ods output =work.captured; … ods output close;
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.