ODS ODS Tip Sheet ODS Tip Sheet ODS ODS Tip Tip Sheet Sheet ODS Tip Sheet Output Destination Output Output Destination Destination Output Destination Basic Usage Basic Basic Usage Usage Basic Usage ods output output-object-name=data-set-name; ods ods output output output-object-name=data-set-name; output-object-name=data-set-name; ods output output-object-name=data-set-name; procedure code … procedure procedure code code ……… procedure code ………… ods output close; ods ods output output close; close; ods output close; Use ods trace on; determine the output object Use Use ods ods trace trace on; on; to determine determine the the output output object object Use ods trace on; tototo determine the output object names. names. names. names. Customizing Reports Customizing Customizing Reports Reports Customizing Reports ods proclabel “text”; ods ods proclabel proclabel “text”; “text”; ods proclabel “text”; Specifies text to use place the procedure label Specifies Specifies text text to use use in place place of the the procedure procedure label label Specifies text to to use ininin place ofofof the procedure label in the table of contents. in in the the table table of of contents. contents. in the table of contents. ods proctitle; ods noproctitle; ods ods proctitle; proctitle; or ods ods noproctitle; noproctitle; ods proctitle; ororor ods noproctitle; Specifies whether or not the procedure title should Specifies Specifies whether whether or or not the the procedure procedure title title should should Specifies whether or notnot the procedure title should be printed. be be printed. printed. be printed. ods select selection(s); ods ods select select selection(s); selection(s); ods select selection(s); ods exclude selections(s); ods ods exclude exclude selections(s); selections(s); ods exclude selections(s); Specifies the output objects show exclude from Specifies Specifies the the output output objects objects to show show or exclude exclude from from Specifies the output objects tototo show ororor exclude from the report, respectively. the the report, report, respectively. respectively. the report, respectively. ods show; ods ods show; show; ods show; Displays current select and exclude lists. Displays Displays current current select select and and exclude exclude lists. lists. Displays current select and exclude lists. ods trace on; ods ods trace trace on; on; ods trace on; Displays information about output objects they Displays Displays information information about about output output objects objects as they they Displays information about output objects asasas they are created. This information includes the name are are created. created. This This information information includes includes the the name name are created. This information includes the name ofofofof the object, the name the template, labels, paths, the the object, object, the the name name of the the template, template, labels, labels, paths, paths, the object, the name ofofof the template, labels, paths, and label paths. and and label label paths. paths. and label paths. Example Example Example Example several ODS destinations; *Open Open Open several several ODS ODS destinations; destinations; ***Open several ODS destinations; ods html frame="report.html" ods ods html html frame="report.html" frame="report.html" ods html frame="report.html" file="reportb.html" file="reportb.html" file="reportb.html" file="reportb.html" contents="reportc.html" contents="reportc.html" contents="reportc.html" contents="reportc.html" style=styles.analysis; style=styles.analysis; style=styles.analysis; style=styles.analysis; ods pdf file="report.pdf" notoc; ods ods pdf pdf file="report.pdf" file="report.pdf" notoc; notoc; ods pdf file="report.pdf" notoc; ods rtf file="report.rtf" bodytitle; ods ods rtf rtf file="report.rtf" file="report.rtf" bodytitle; bodytitle; ods rtf file="report.rtf" bodytitle; ods tagsets.excelxp file="report.xls"; ods ods tagsets.excelxp tagsets.excelxp file="report.xls"; file="report.xls"; ods tagsets.excelxp file="report.xls"; ods output variables=work.vardata; ods ods output output variables=work.vardata; variables=work.vardata; ods output variables=work.vardata; ODS: ODS: ODS: ODS: Output Delivery Output OutputDelivery Delivery Delivery Output System System System System Tip Sheet Tip TipSheet Sheet Sheet Tip only the "variables" table; *Select Select Select only only the the "variables" "variables" table; table; ***Select only the "variables" table; ods select variables; ods ods select select variables; variables; ods select variables; off proc titles; *Turn Turn Turn off off proc proc titles; titles; ***Turn off proc titles; ods noproctitle; ods ods noproctitle; noproctitle; ods noproctitle; the Contents Procedure; *Run Run Run the the Contents Contents Procedure; Procedure; ***Run the Contents Procedure; proc contents data=sashelp.class; run; proc proc contents contents data=sashelp.class; data=sashelp.class; run; run; proc contents data=sashelp.class; run; This tip sheet places frequently used This This tip tip sheet sheet places places frequently frequently used used This tip sheet places frequently used information in one place, on one sheet information information inone one place, place, on one one sheet sheet information in in one place, onon one sheet ofofofof paper, so you don’t have to search through the paper, paper, so you you don’t don’t have have tosearch search through through the the paper, soso you don’t have toto search through the online documentation. It also gives you online online documentation. documentation. Italso also gives gives you you online documentation. It It also gives you something home, type in, and try. something something totake take take home, home, type type in, in, and and try. try. something tototo take home, type in, and try. all ODS destinations; *Close Close Close all all ODS ODS destinations; destinations; ***Close all ODS destinations; ods _all_ close; ods ods _all_ _all_ close; close; ods _all_ close; the listing destination; *Re-open Re-open Re-open the the listing listing destination; destination; ***Re-open the listing destination; ods listing; ods ods listing; listing; ods listing; ODS allows you your reports ODS ODS allows allows you you toformat format format your your reports reports ODS allows you tototo format your reports inininin various formats such as HTML, PDF, RTF, various various formats formats such such as HTML, HTML, PDF, PDF, RTF, RTF, various formats such asas HTML, PDF, RTF, Microsoft Excel, and many others. Microsoft Microsoft Excel, Excel, and and many many others. others. Itenables enables enables Microsoft Excel, and many others. ItItIt enables you your reports by selecting only you you tocustomize customize customize your your reports reports by by selecting selecting only only you tototo customize your reports by selecting only the results you want to see. It even lets you the the results results you you want want tosee. see. Iteven even lets lets you you the results you want toto see. It It even lets you apply styles reports including many apply apply styles styles toyour your your reports reports including including many many apply styles tototo your reports including many ®®® ® or those that you create. This supplied by SAS orthose those that that you you create. create. This This supplied supplied by SAS SASoror supplied byby SAS those that you create. This tip sheet presents the most common tip sheet sheet presents presents the the most most common common tiptip sheet presents the most common statements and options statements statements and and options options inODS. ODS. ODS. statements and options ininin ODS. QuickTime™ and aaa QuickTime™ QuickTime™ and and TIFF (LZW) decompressor TIFF TIFF (LZW) (LZW) decompressor decompressor are needed totosee this picture. are are needed needed tosee see this this picture. picture. Locating Style Definitions Locating Locating Style Style Definitions Definitions Locating Style Definitions Advanced Techniques Advanced Advanced Techniques Techniques Advanced Techniques odstemplates odstemplates odstemplates odstemplates Entering odstemplates the command bar Entering Entering odstemplates odstemplates in the the command command bar bar Entering odstemplates ininin the command bar opens the Template Browser. The styles supplied by opens opens the the Template Template Browser. Browser. The The styles styles supplied supplied by by opens the Template Browser. The styles supplied by SAS are in the SASHELP.TMPLMST/Styles folder. SAS SAS are are in in the the SASHELP.TMPLMST/Styles SASHELP.TMPLMST/Styles folder. folder. SAS are in the SASHELP.TMPLMST/Styles folder. For more information on advanced techniques such For For more more information information on on advanced advanced techniques techniques such such For more information on advanced techniques such as the DOCUMENT destination which allows asthe the DOCUMENT DOCUMENT destination destination which which allows allows asas the DOCUMENT destination which allows extensive manipulation reports, PROC extensive extensive manipulation manipulation of reports, reports, or PROC PROC extensive manipulation ofofof reports, ororor PROC TEMPLATE which allows you to modify styles TEMPLATE TEMPLATE which which allows allows you you to to modify modify styles styles TEMPLATE which allows you to modify styles asasasas well as create table templates or modify table well well as as create create table table templates templates or or modify modify table table well as create table templates or modify table templates used by SAS procedures, see templates templates used used by by SAS SAS procedures, procedures, see see templates used by SAS procedures, see http://support.sas.com/v9doc. http://support.sas.com/v9doc. http://support.sas.com/v9doc. http://support.sas.com/v9doc. proc template; list styles; run; proc proc template; template; list list styles; styles; run; run; proc template; list styles; run; Lists the SAS-supplied styles the log. Lists Lists the SAS-supplied SAS-supplied styles styles to the the log. log. Lists thethe SAS-supplied styles tototo the log. Column for logo, address, and trademark info Column Column for for logo, logo, address, address, and and trademark trademark info info Column for logo, address, and trademark info SAS Institute Inc. World Headquarters +1 919 677For 8000 www.sas.com/offices complete information, refer the For For complete complete information, information, refer refer to the the For complete information, refer tototo the Base SAS 9.2 documentation at Base Base SAS SAS9.29.2 9.2 documentation documentation Base SAS documentation at atat http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc ® or service names are registered trademarks or trademarks SAS and all other SAS Institute Inc. product ® ®® of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies. Copyright © 2008, SAS Institute Inc. All rights reserved. 479398_01.08 ODSTip TipSheet Sheet ODS Common Common CommonDestinations Destinations Destinations “Destination” “Destination” “Destination”isis isaaaterm term termfor for forthe the theODS ODS ODSdriver driver driverthat that that generates generates generatesaaaspecific specific specificoutput output outputformat. format. format. Destination Destination DestinationName Name Name Description Description Description Listing Listing Listing Plain Plain Plaintext text text HTML HTML HTML Primary Primary Primaryformat format formatused used usedon on onthe the the World World WorldWide Wide WideWeb Web Web(WWW) (WWW) (WWW) XML XML XML Plain Plain Plaintext text textdata data datainterchange interchange interchange format format format PDF PDF PDF Works Works Workswell well wellfor for forprinting printing printingasas as well well wellasas ason-screen on-screen on-screenviewing viewing viewing Postscript Postscript Postscript Works Works Workswell well wellfor for forprinting printing printing RTF RTF RTF Used Used Usedby by bymost most mostword word word processors processors processors Tagsets.ExcelXP Tagsets.ExcelXP Tagsets.ExcelXP Share Share ShareSAS SAS SASdata data datawith with with Microsoft Microsoft MicrosoftExcel Excel Excel Output Output Output Creates Creates CreatesSAS SAS SASdata data datasets sets setsfrom from from ODS ODS ODStables tables tables Opening Opening Openingand and andClosing Closing ClosingDestinations Destinations Destinations ods ods odsdestination-name destination-name destination-name<option(s)>; <option(s)>; <option(s)>; Opens Opens Opensthe the theODS ODS ODSdestination, destination, destination,destination-name, destination-name, destination-name,with with with options, options, options,option(s). option(s). option(s). ods ods odsdestination-name destination-name destination-nameclose; close; close; Closes Closes Closesthe the theODS ODS ODSdestination, destination, destination,destination-name. destination-name. destination-name. ods ods ods_all_ _all_ _all_close; close; close; Closes Closes Closesall all allODS ODS ODSdestinations destinations destinations(including (including (includingListing). Listing). Listing). Basic Basic BasicODS ODS ODSUsage Usage Usage ods ods odsdestination-name; destination-name; destination-name; ………procedure procedure procedurecode code code…… … ods ods odsdestination-name destination-name destination-nameclose; close; close; HTML HTML HTMLDestination Destination Destination Basic Basic BasicUsage Usage Usage ods ods odshtml html html<option(s)>; <option(s)>; <option(s)>; …… …procedure procedure procedurecode code code…… … ods ods odshtml html htmlclose; close; close; PDF PDF PDFDestination Destination Destination Basic Basic BasicUsage Usage Usage ods ods odspdf pdf pdf<option(s)>; <option(s)>; <option(s)>; …… …procedure procedure procedurecode code code…… … ods ods odspdf pdf pdfclose; close; close; File File FileOptions Options Options File File FileOptions Options Options file=“filename” file=“filename” file=“filename”oror orbody=“filename” body=“filename” body=“filename” Specifies Specifies Specifiesthe the thename name nameofof ofthe the thefile file filethat that thatwill will willcontain contain containthe the the output output outputtables. tables. tables. file=“filename” file=“filename” file=“filename” Specifies Specifies Specifiesthe the thename name nameofof ofthe the thefile file filethat that thatwill will willcontain contain containthe the the output output outputtables. tables. tables. contents=“filename” contents=“filename” contents=“filename” Specifies Specifies Specifiesthe the thename name nameofof ofthe the thefile file filethat that thatwill will willcontain contain containaaa table table tableofof ofcontents contents contentsfor for forthe the theoutput. output. output. Document Document DocumentMetadata Metadata MetadataOptions Options Options frame=“filename” frame=“filename” frame=“filename” Specifies Specifies Specifiesthe the thename name nameofof ofthe the thefile file filethat that thatincludes includes includesthe the thebody body body file file fileand and andtable table tableofof ofcontents contents contentsinto into intoaaaset set setofof ofscrollable scrollable scrollable frames. frames. frames. stylesheet=“filename” stylesheet=“filename” stylesheet=“filename” Specifies Specifies Specifiesan an anexternal external externalfilename filename filenamefor for forstyles. styles. styles. The The Thefollowing following followingfile file filesub-options sub-options sub-optionscan can canbe be bespecified specified specifiedinin in parentheses parentheses parenthesesfollowing following followingeach each eachofof ofthe the theabove above aboveoptions. options. options. no_top_matter no_top_matter no_top_matter no_bottom_matter no_bottom_matter no_bottom_matter Specifies Specifies Specifiesthat that thatno no nobeginning beginning beginningoror orending ending endingmarkup, markup, markup, respectively, respectively, respectively,should should shouldbe be beinserted inserted insertedinto into intothe the theoutput output outputfile. file. file. RTF RTF RTFDestination Destination Destination Basic Basic BasicUsage Usage Usage ods ods odsrtf rtf rtf<option(s)>; <option(s)>; <option(s)>; …… …procedure procedure procedurecode code code…… … ods ods odsrtf rtf rtfclose; close; close; File File FileOptions Options Options file=“filename” file=“filename” file=“filename” Specifies Specifies Specifiesthe the thename name nameofof ofthe the thefile file filethat that thatwill will willcontain contain containthe the the output output outputtables. tables. tables. Document Document DocumentMetadata Metadata MetadataOptions Options Options author=“text” author=“text” author=“text” keywords=“text” keywords=“text” keywords=“text” subject=“text” subject=“text” subject=“text” title=“text” title=“text” title=“text” Specifies Specifies Specifiesthe the theauthor, author, author,keywords, keywords, keywords,subject, subject, subject,and and andtitle title titleinin in the the themetadata metadata metadataofof ofthe the thePDF PDF PDFdocument. document. document. author=“text” author=“text” author=“text” operator=“text” operator=“text” operator=“text” title=“text” title=“text” title=“text” Specifies Specifies Specifiesthe the theauthor, author, author,operator, operator, operator,and and andtitle title titleinin inthe the the metadata metadata metadataofof ofthe the theRTF RTF RTFdocument. document. document. Other Other OtherCommonly Commonly CommonlyUsed Used UsedOptions Options Options Other Other OtherCommonly Commonly CommonlyUsed Used UsedOptions Options Options columns=n columns=n columns=n Specifies Specifies Specifiesthe the thenumber number numberofof ofcolumns columns columnson on oneach each eachpage. page. page. bodytitle bodytitle bodytitle Specifies Specifies Specifiesthat that thatthe the thetitles titles titlesand and andfootnotes footnotes footnotesshould should shouldappear appear appear inin inthe the thebody body bodyofof ofthe the thereport, report, report,not not notasas asRTF RTF RTFinstructions. instructions. instructions. compress=n compress=n compress=n Specifies Specifies Specifiesthe the thelevel level levelofof ofcompression. compression. compression. notoc notoc notoc Specifies Specifies Specifiesthat that thatthe the thetable table tableofof ofcontents contents contentsbookmarks bookmarks bookmarks should should shouldnot not notbe be begenerated. generated. generated. columns=n columns=n columns=n Specifies Specifies Specifiesthe the thenumber number numberofof ofcolumns columns columnson on oneach each eachpage. page. page. url=“URL” url=“URL” url=“URL” Specifies Specifies SpecifiesaaaURL URL URLtoto tobe be beused used usedinin inplace place placeofof ofthe the thefilename filename filename inin inlinks links linkstoto tothe the thefile. file. file. startpage=yes startpage=yes startpage=yes| |no | no no| |now | now now Controls Controls Controlspage page pagebreaks. breaks. breaks. sasdate sasdate sasdate Specifies Specifies Specifiesthat that thatthe the thetime time timeand and anddate date datethat that thatthe the theSAS SAS SAS program program programwas was wassubmitted submitted submittedshould should shouldbe be bewritten written writtentoto tothe the the RTF, RTF, RTF,instead instead insteadofof ofthe the thetime time timethat that thatthe the thefile file filewas was wasopened. opened. opened. Other Other OtherCommonly Commonly CommonlyUsed Used UsedOption Option Option style=style-definition style=style-definition style=style-definition Specifies Specifies Specifiesthe the thestyle style styledefinition definition definitiontoto touse. use. use. startpage=yes startpage=yes startpage=yes| |no | no no| |now | now now Controls Controls Controlspage page pagebreaks. breaks. breaks. style=style-definition style=style-definition style=style-definition Specifies Specifies Specifiesthe the thestyle style styledefinition definition definitiontoto touse. use. use. uniform uniform uniform Specifies Specifies Specifiesthat that thatmultiple multiple multiplepage page pagetables tables tablesshould should shouldretain retain retain their their theirwidth width widthacross across acrosspages. pages. pages. style=style-definition style=style-definition style=style-definition Specifies Specifies Specifiesthe the thestyle style styledefinition definition definitiontoto touse. use. use.
© Copyright 2026 Paperzz