logo资料库

SAS ODS RTF使用重要选项简表(2页).pdf

第1页 / 共2页
第2页 / 共2页
资料共2页,全文预览结束
Actions ODS RTF Tip Sheet ODS RTF Tip Sheet ODS RTF Tip Sheet ODS RTF Tip Sheet destination and creates RTF output. Action Syntax Action Syntax Actions Actions Actions Actions Action Syntax Action Syntax ods rtf <(identifier)> ; ods rtf <(identifier)> ; If you use the ODS RTF statement without If you use the ODS RTF statement without an action or options, then it opens the RTF an action or options, then it opens the RTF destination and creates RTF output. destination and creates RTF output. close closes the RTF destination and the file that is associated with it. You cannot print the file until you close the destination. ods rtf <(identifier)> ; ods rtf <(identifier)> ; exclude exclusions(s) | all |none If you use the ODS RTF statement without If you use the ODS RTF statement without excludes output objects from the RTF an action or options, then it opens the RTF an action or options, then it opens the RTF destination. destination and creates RTF output. destination and creates RTF output. select selections(s) | all |none selects output objects for the RTF destination. close close close show close writes the current selection or exclusion list closes the RTF destination and the file that closes the RTF destination and the file that closes the RTF destination and the file that closes the RTF destination and the file that for the RTF destination to the SAS® log. is associated with it. You cannot print the is associated with it. You cannot print the is associated with it. You cannot print the is associated with it. You cannot print the file until you close the destination. file until you close the destination. file until you close the destination. file until you close the destination. exclude exclusions(s) | all |none exclude exclusions(s) | all |none exclude exclusions(s) | all |none exclude exclusions(s) | all |none excludes output objects from the RTF excludes output objects from the RTF excludes output objects from the RTF excludes output objects from the RTF destination. destination. destination. destination. select selections(s) | all |none select selections(s) | all |none select selections(s) | all |none select selections(s) | all |none selects output objects for the RTF selects output objects for the RTF selects output objects for the RTF selects output objects for the RTF destination. destination. destination. destination. show show show show writes the current selection or exclusion list writes the current selection or exclusion list writes the current selection or exclusion list writes the current selection or exclusion list for the RTF destination to the SAS® log. for the RTF destination to the SAS® log. for the RTF destination to the SAS® log. for the RTF destination to the SAS® log. none is specified. The following goptions produce better RTF output in PORTRAIT mode. goptions reset=goptions device=sasemf target=sasemf xmax=7.5in ymax=10in; Column for logo, address, and trademark info. Column for logo, address, and trademark info. RTF and SAS/GRAPH® RTF and SAS/GRAPH® RTF and SAS/GRAPH® The following goptions produce better RTF RTF and SAS/GRAPH® output in LANDSCAPE mode. RTF supports three device types, SASEMF, RTF supports three device types, SASEMF, RTF supports three device types, SASEMF, RTF supports three device types, SASEMF, goptions reset=goptions device=sasemf PNG, and JPEG. SASEMF might print PNG, and JPEG. SASEMF might print PNG, and JPEG. SASEMF might print PNG, and JPEG. SASEMF might print target=sasemf xmax=10in ymax=7.5in; best; it is the default graphics device when best; it is the default graphics device when best; it is the default graphics device when best; it is the default graphics device when none is specified. none is specified. none is specified. none is specified. The following goptions produce better RTF The following goptions produce better RTF The following goptions produce better RTF The following goptions produce better RTF output in PORTRAIT mode. output in PORTRAIT mode. output in PORTRAIT mode. output in PORTRAIT mode. goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf target=sasemf xmax=7.5in ymax=10in; target=sasemf xmax=7.5in ymax=10in; target=sasemf xmax=7.5in ymax=10in; target=sasemf xmax=7.5in ymax=10in; The following goptions produce better RTF The following goptions produce better RTF The following goptions produce better RTF The following goptions produce better RTF output in LANDSCAPE mode. output in LANDSCAPE mode. output in LANDSCAPE mode. output in LANDSCAPE mode. goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf goptions reset=goptions device=sasemf target=sasemf xmax=10in ymax=7.5in; target=sasemf xmax=10in ymax=7.5in; target=sasemf xmax=10in ymax=7.5in; target=sasemf xmax=10in ymax=7.5in; Column for logo, address, and trademark info. Column for logo, address, and trademark info. For complete information, refer to the Base SAS® 9.2 documentation at http://support.sas.com/v9doc For complete information, refer to the For complete information, refer to the For complete information, refer to the For complete information, refer to the Base SAS® 9.2 documentation at Base SAS® 9.2 documentation at Base SAS® 9.2 documentation at Base SAS® 9.2 documentation at http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc http://support.sas.com/v9doc SAS INSTITUTE INC. U.S. & CANADA SALES 800 727 0025 WORLD HEADQUARTERS 919 677 8000 www.sas.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks 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 © 2007, SAS Institute Inc. All rights reserved. 496475.0508 Tip Sheet ODS RTF ODS RTF ODS RTF ODS RTF ODS RTF Tip Sheet Tip Sheet Tip Sheet Tip Sheet This tip sheet places frequently used information in one place, on one sheet of paper, so you don’t have to search through the online documentation. It also gives you something to take home, type in, and try. This tip sheet presents the most common statements and attributes used in creating output with the ODS RTF statement. This statement opens, manages, or closes the RTF destination, which produces RTF output, a form of output that is read by Microsoft Word. This tip sheet places frequently used This tip sheet places frequently used This tip sheet places frequently used This tip sheet places frequently used information in one place, on one sheet of information in one place, on one sheet of information in one place, on one sheet of information in one place, on one sheet of paper, so you don’t have to search through the paper, so you don’t have to search through the paper, so you don’t have to search through the paper, so you don’t have to search through the online documentation. It also gives you online documentation. It also gives you online documentation. It also gives you online documentation. It also gives you something to take home, type in, and try. something to take home, type in, and try. something to take home, type in, and try. something to take home, type in, and try. This tip sheet presents the most common This tip sheet presents the most common This tip sheet presents the most common This tip sheet presents the most common statements and attributes used in creating statements and attributes used in creating statements and attributes used in creating statements and attributes used in creating output with the ODS RTF statement. This output with the ODS RTF statement. This output with the ODS RTF statement. This output with the ODS RTF statement. This statement opens, manages, or closes the RTF statement opens, manages, or closes the RTF statement opens, manages, or closes the RTF statement opens, manages, or closes the RTF destination, which produces RTF output, a form destination, which produces RTF output, a form destination, which produces RTF output, a form destination, which produces RTF output, a form of output that is read by Microsoft Word. of output that is read by Microsoft Word. of output that is read by Microsoft Word. of output that is read by Microsoft Word.
Basic Usage Basic Usage ods rtf ; … procedure code … ods rtf close; ods rtf ; … procedure code … ods rtf close; Common Options Common Options anchor=”anchor-name” anchor=”anchor-name” specifies the root name for the anchor tag specifies the root name for the anchor tag that identifies each output object. that identifies each output object. columns=n columns=n specifies the number of columns to create specifies the number of columns to create on each page of output. on each page of output. file=”filename” file=”filename” specifies the name of the file that will specifies the name of the file that will contain the output tables. contain the output tables. newfile=proc| table | bygroup | none newfile=proc| table | bygroup | none controls when a new RTF file is started. controls when a new RTF file is started. startpage=no | now | yes startpage=no | now | yes controls page breaks. controls page breaks. style=style-definition style=style-definition specifies the style definition to use. specifies the style definition to use. text=”text-string” text=”text-string” inserts a text string into your output. inserts a text string into your output. ODS RTF Tip Sheet ODS RTF Tip Sheet ODS RTF Examples ODS RTF Examples This code snippet will create the output file “output.rtf” with a simple table of five observations. ods rtf file="output.rtf"; proc print data=sashelp.class(obs=5); run; ods rtf close; This code snippet will create the output file “output.rtf” with a simple table of five observations. ods rtf file="output.rtf"; proc print data=sashelp.class(obs=5); run; ods rtf close; This code snippet will create the output file “style.rtf” with a simple table of five observations using the style template “Ocean”: ods rtf file="style.rtf" style=Ocean; proc print data=sashelp.class(obs=5); run; ods rtf close; This code snippet will create the output file “style.rtf” with a simple table of five observations using the style template “Ocean”: ods rtf file="style.rtf" style=Ocean; proc print data=sashelp.class(obs=5); run; ods rtf close; RTF Metadata Options RTF Metadata Options author=”author-text” author=”author-text” inserts the text string, that you specify as inserts the text string, that you specify as author, into the metadata of a file. author, into the metadata of a file. operator=”subject-text” operator=”subject-text” inserts the text string, that you specify as inserts the text string, that you specify as the subject, into the metadata of a file. the subject, into the metadata of a file. title=”title-text” title=”title-text” inserts the text string, that you specify as inserts the text string, that you specify as the title, into the metadata of a file. the title, into the metadata of a file. RTF Specific Options RTF Specific Options bodytitle Titles and footnotes will occur as text in the RTF file and not be used for Microsoft Word header and footer controls. prepage=”text-string” specifies a text string that occurs before a table on a page. sasdate The date embedded in the RTF file will be the date from the SAS log and not the date that the RTF file is opened. bodytitle Titles and footnotes will occur as text in the RTF file and not be used for Microsoft Word header and footer controls. prepage=”text-string” specifies a text string that occurs before a table on a page. sasdate The date embedded in the RTF file will be the date from the SAS log and not the date that the RTF file is opened. RTF Table of Contents Options RTF Table of Contents Options contents contents inserts a first page on the RTF document inserts a first page on the RTF document that has RTF specifications to create a that has RTF specifications to create a Table of Contents from information Table of Contents from information embedded in the RTF file. embedded in the RTF file. toc_data toc_data notoc_data notoc_data allows the embedding of table of contents allows the embedding of table of contents information in the RTF file. The option can information in the RTF file. The option can be toggled during the SAS® process be toggled during the SAS® process creating the RTF file. In SAS 9.1.3, creating the RTF file. In SAS 9.1.3, toc_data was the default. In SAS 9.2, the toc_data was the default. In SAS 9.2, the default was changed to notoc_data. default was changed to notoc_data. Since the Table of Contents is not created Since the Table of Contents is not created until the document is opened in Word, until the document is opened in Word, several files created by SAS can be merged several files created by SAS can be merged together in Word and a new updated Table together in Word and a new updated Table of Contents can be created by re-issuing the of Contents can be created by re-issuing the field instruction embedded on the leading field instruction embedded on the leading Table of Contents page. Table of Contents page. The Table of Contents page is created by The Table of Contents page is created by right-clicking under the Table of Contents right-clicking under the Table of Contents title on the first page. A pop menu suggests title on the first page. A pop menu suggests several actions. Choose “Update Field”. several actions. Choose “Update Field”.
分享到:
收藏