好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

enhancing your output with ods.pdf

26页
  • 卖家[上传人]:aa****6
  • 文档编号:37041853
  • 上传时间:2018-04-06
  • 文档格式:PDF
  • 文档大小:1.30MB
  • / 26 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • CHAPTER 5 Enhancing Your Output with ODS 5.1 Concepts of the Output Delivery System 152 5.2 Tracing and Selecting Procedure Output 154 5.3 Creating SAS Data Sets from Procedure Output 156 5.4 Using ODS Statements to Create HTML Output 158 5.5 Using ODS Statements to Create RTF Output 160 5.6 Using ODS Statements to Create PRINTER Output 162 5.7 Customizing Titles and Footnotes 164 5.8 Customizing PROC PRINT Output with the STYLE= Option 166 5.9 Customizing PROC REPORT Output with the STYLE= Option 168 5.10 Customizing PROC TABULATE Output with the STYLE= Option 170 5.11 Adding Traffic-Lighting to Your Output 172 5.12 Selected Style Attributes 174 152 The Little SAS Book 5.1 Concepts of the Output Delivery System You might think that procedures produce output. They don’t. Technically, procedures produce only data. Then they send that data to the Output Delivery System (ODS) which determines where the output should go and what it should look like when it gets there. That means the question to ask yourself is not whether you want to use ODS—you always use ODS. The question is whether to accept default output or choose something else. ODS is like a busy airport. Passengers arrive by car and bus. Once at the airport, passengers check baggage, pass security, eventually board a plane, and fly out to their destinations. In ODS, data are like passengers arriving from various procedures.1 ODS processes each set of data and sends it off to its proper destination. In fact, different types of ODS output are called destinations. What your data look like when they get to their destination is determined by templates. A template is a set of instructions telling ODS how to format your data. These two concepts—destinations and templates—are fundamental for understanding what you can do with ODS. Destinations Whenever you don’t specify a destination, your output will be sent, by default, to the listing. The LISTING destination is what you see in the Output window if you use the SAS windowing environment, or in the listing or output file if you use batch mode. Here are the major destinations: LISTING standard SAS output HTML Hypertext Markup Language RTF Rich Text Format PRINTER high-resolution printer output2 PS PostScript PCL Printer Control Language PDF Portable Document Format OUTPUT SAS output data set MARKUP markup languages including XML DOCUMENT output document Most of these destinations are designed to create output for viewing on a screen or for printing. The OUTPUT destination creates SAS data sets. The MARKUP destination is a general purpose tool for creating output in formats defined by tagsets. This includes XML (eXtensible Markup Language), EXCELXP, LaTeX, CSV (comma-separated values), and many other formats where data can be thought of as separated by tags. The DOCUMENT destination, on the other hand, allows you to create a reusable output “document” that you can rerender for any destination. So, if your boss decides he really wants that report in PDF, not RTF, you can replay the output document without having to rerun the entire SAS program that created the data. With an output document, you can also rearrange, duplicate, or delete tables to further customize your output. 1 It is also possible to send output to ODS from a DATA step by using a special FILE statement. See the SAS Help and Documentaion for more information. 2 The PS, PCL, and PDF destinations are part of the PRINTER destination, and are discussed in section 5.4. Chapter 5: Enhancing Your Output with ODS 153 Style and table templates Templates tell ODS how to format and present your data. The two most common types of templates are table templates and style templates (also called table definitions and style definitions). A table template specifies the basic structure of your output (which variable will be in the first column?); while a style template specifies how the output will look (will the headers be blue or red?). ODS combines the data produced by a procedure with a table template and together they are called an output object. The output object is then combined with a style template and sent to a destination to create your final output.3 You can create your own table and style templates using the TEMPLATE procedure. However, PROC TEMPLATE’s syntax is rather arcane. Fortunately, there are other, easier, ways to control and modify output. The quickest and easiest way to change the look of your output is to use one of the many built-in style templates. To view a list of the style templates available on your system, submit the following PROC TEMPLATE statements, and look in the output window for the list: PROC TEMPLATE; LIST STYLES; RUN; A few of the built-in style templates are ANALYSIS D3D MINIMAL SASWEB BARETTSBLUE DEFAULT PRINTER SANSPRINTER BRICK JOURNAL RTF STATISTICAL Notice that RTF and PRINTER are names of both des。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.