You are previewing Output Delivery System: The Basics and Beyond.
O'Reilly logo
Output Delivery System: The Basics and Beyond

Book Description

Incorporating broad coverage of the best ODS features in one book, Output Delivery System: The Basics and Beyond goes beyond Lauren Haworth's original ODS text to demonstrate the many new and enhanced features of ODS and SAS 9.2. With SAS 9.2, ODS provides a myriad of choices for reporting and displaying analytical results with a greater variety of formatting selections and output destinations. As experienced SAS users, Lauren E. Haworth, Cynthia L. Zender, and Michele M. Burlew know how important it is to be able to produce customized output in different formats to meet the needs of clients.Geared toward all levels of SAS users, Output Delivery System: The Basics and Beyond is an example-driven book that presents each of the wide array of ODS techniques in an easy-to-use, two-page layout, with the text and code on one page and the resulting output on the facing page. The book begins with basic syntax and progresses to more complex techniques and custom styles. You will learn to take basic SAS output and transform it into an HTML page, a word-processor-friendly RTF file, or printer-friendly PDF output. You'll learn how to generate a table of contents page for RTF and PDF files, generate bookmarks for PDF files, and generate custom page numbering for those destinations. You will also learn the basic concepts of changing style templates, using table templates with the DATA step, and using tagset templates to generate custom markup language tags and output. Other new features of ODS are also discussed, such as the ODS Graphics Framework and the new ODS Statistical Graphics procedures.

Table of Contents

  1. Praise from the Experts
  2. Copyright
  3. Acknowledgments
  4. About This Book
    1. Purpose
    2. Is This Book for You?
    3. Scope of This Book
    4. How to Use the Examples
    5. The Code in This Book
    6. Software Used to Develop This Book's Content
    7. Data Sets and Programs Used in This Book
    8. Tips and Warnings
    9. SAS Author Pages
    10. Additional Resources
    11. Comments or Questions?
    12. SAS Publishing News
  5. Introduction
    1. Why Use ODS?
      1. Limitations of SAS Listing Output
      2. Difficulties with Importing Standard Listing Output into a Word Processor
      3. ODS Output: A Variety of Formats to Fit Your Needs
    2. ODS Basics
      1. Overview
      2. Table Definitions and Style Definitions
      3. Output Objects and Output Destinations
      4. ODS References and Resources
  6. The Basics
    1. HTML Output
      1. Generating Your First HTML File
      2. Exploring the Body File: The Basics of HTML
      3. Exploring the HTML Body File: Graphics
      4. Combining the Results of Several Procedures
      5. Generating a Table of Contents
      6. Exploring the Frame File
      7. Breaking Up Output into Separate Files
      8. Simulating Page Breaks Using Cascading Style Sheets
      9. More on Page Breaks Using the NEWFILE= Option
      10. Changing Procedure Labels in the Table of Contents
      11. Changing Multiple Procedure Labels
      12. Changing the Title Bar
      13. Creating Alternate HTML Formats
      14. Creating Multiple Copies of the Same Output
      15. Exploring Links and Anchors
      16. Using Links and Anchors to Link Your Results to Your Web Site
      17. Adding HTML Code to Customize Your Output
      18. Limiting Inclusion of HTML Tags in Output
      19. Applying Inline Formatting
      20. Adding JavaScript to Your Output
      21. Creating and Using Cascading Style Sheets
      22. Creating Drill-Downs within Output Tables
      23. Creating Output with Just the Results
      24. Appending to an Existing HTML File
      25. Appending to an Existing Table of Contents
      26. Moving ODS Output into Your Internet or Intranet Site
      27. Sending HTML Results Automatically via E-Mail
      28. Importing Your ODS Output into a Spreadsheet
      29. Using ODS Suboptions
    2. RTF Output
      1. Creating Your First RTF File
      2. Importing into a Word Processor
      3. Working with Headers and Footers in Microsoft Word
      4. Handling Page Breaks in RTF Output
      5. Controlling Page Orientation
      6. Controlling Page Size
      7. Controlling Page Breaks
      8. Controlling Page Margins
      9. Creating Multiple Columns on a Page
      10. Adding "Page X of Y" to RTF Reports
      11. Adding Static or Dynamic Dates
      12. Adding Customized Dates
      13. Placing Title and Footnote Text in the Body of the Document
      14. Adding Images to RTF Output
      15. Adding Text
      16. Adding More Complex Text
      17. Adding Hyperlinks to RTF Output
      18. Adding a Table of Contents to RTF Output
      19. Completing the Table of Contents
      20. Specifying Metadata in Your RTF File
      21. Aligning Decimals in RTF Output
      22. Exploring RTF as Created by Microsoft Word
      23. Inserting Field Codes into Your RTF Output
      24. Enhancing RTF Output by Using RTF Control Words and Field Codes
      25. Sending RTF Field Codes and Control Strings Only to RTF Output
      26. Importing RTF Output into a Slide Show
      27. More Enhancement of RTF Output Using RTF Control Words
      28. The New TAGSETS.RTF Destination
      29. Inserting Text with the PREPAGE= Option
      30. Using the TAGSETS.RTF OPTIONS Suboptions
      31. Generating a Table of Contents with TAGSETS.RTF
      32. Changing Table Headers with RTF Control Strings
      33. Rotating or Aligning Table Headers with RTF Control Strings
      34. Adding Hyperlinks to TAGSETS.RTF Output
    3. PDF Output
      1. Creating a PDF File
      2. Creating Bookmarks in Your PDF File
      3. Modifying the Display of Bookmarks in Your PDF File
      4. Creating PDF Files That Include Hyperlinks and Annotations
      5. Another Means of Adding Hyperlinks and Annotations to PDF Output
      6. Optimizing PDFs to Reduce Size and Increase Compatibility
      7. Creating PDFs with Customized Metadata
      8. Creating a Linked Set of PDF Results
      9. Adding "Page X of Y" Numbers to PDF Output
      10. Controlling Page Breaks
      11. Sending ODS Output to Your Printer
      12. Selecting a Printer
      13. Creating a PostScript File from Your ODS Printer Output
      14. Using the SAS Printer Drivers
      15. Using the SAS PostScript Driver
      16. Printing in Color
      17. Creating Consistent Printed Pages
      18. Creating Multiple Columns on a Page
      19. Controlling Page Orientation
      20. Controlling Page Margins
      21. Controlling Page Size
      22. Creating Multiple Versions of the Same Output
      23. SAS System Options That Affect ODS Printer Output
      24. Converting to PDF with Acrobat
  7. Output Structure
    1. Exploring ODS Output
      1. The ODS TRACE Statement
      2. Identifying Output Objects in Your Listing
      3. Identifying Output Objects by Label Path
      4. Viewing the Results
      5. TRACE Examples: Other Procedures
      6. TRACE Examples: Procedures without ODS Output
    2. Output Data Sets
      1. Creating a Single Output Data Set
      2. Comparing ODS Output Data Sets to Printed Output
      3. Creating Multiple Output Data Sets from a Single Procedure
      4. Creating Output Data Sets from Procedures with Complex Output
      5. Creating Output Data Sets from Multiple Procedures: Part 1
      6. Creating Output Data Sets from Multiple Procedures: Part 2
      7. Creating Output Data Sets without Printed Output
      8. Tip: Turning Off Output to the Results Window
      9. Opening and Closing Output Data Sets
      10. Using Data Set Options with Output Data Sets
      11. Creating ODS Output Data Sets from the PRINT and REPORT Procedures
    3. Limiting ODS Output
      1. Selecting a Subset of Your Results
      2. Selecting Multiple Output Objects
      3. Excluding the Output You Don't Want
      4. Selecting Output for Multiple Procedures
      5. Customizing Your Selections for Each Output Destination
      6. Selecting Complex Combinations of Output Objects
      7. Identifying the Current Selections and Exclusions
      8. Selecting with WHERE Conditions
    4. Using ODS in the DATA Step
      1. Creating ODS Output in the DATA Step Using FILE and PUT Statements
      2. Naming and Labeling the DATA Step Output Object
      3. Selecting Variables to Include in the Output
      4. Controlling the Layout of the Output
      5. Labeling and Formatting the Columns of the Results
      6. Modifying Output with the PUT Statement
      7. Applying Inline Formatting
      8. Using FILE PRINT Options and ODS
    5. Creating Custom Reports from the DATA Step
      1. Understanding the Table Definition Used by the DATA Step
      2. Creating a Custom Table Template with a DATA Step
      3. Calculating Columns in a Custom Table Template
      4. Creating Spanning Column Headers in a Custom Table Template
      5. Creating a Custom HTML Table Definition
      6. Performing Traffic Lighting in a Custom Table Template
      7. Using Generic Columns in a Table Template
      8. Using Macro Variables in a Custom Table Template
      9. Using Dynamic Variables as Attribute Values in a Custom Table Template
    6. Modifying and Replaying ODS Output
      1. The ODS DOCUMENT Destination
      2. Using the Documents Window
      3. Using PROC DOCUMENT to Manage Document Stores
      4. Replaying a Document Store Using PROC DOCUMENT and Pop-Up Menus
      5. Understanding the Fundamental Concepts of the ODS DOCUMENT Destination
      6. Creating a New Document Store Interactively
      7. Creating a New Document Store Interactively (continued)
      8. Creating a New Document Store Interactively (continued)
      9. Changing Titles and Page Breaks
      10. Creating a New Document Store Using PROC DOCUMENT
      11. Copying Objects into a New Document Store Using PROC DOCUMENT
      12. Adding Titles and Correcting Page Breaks after Copying Output Objects to a New Document
      13. Using the SASEDOC LIBNAME Engine
      14. Summary of PROC DOCUMENT Statements
    7. Using Tagsets to Generate MARKUP Output
      1. ODS MARKUP Destination
      2. Creating CSV Files with ODS MARKUP
      3. Creating HTML Result Files with ODS MARKUP
      4. Creating XML Files with ODS MARKUP
      5. Learning More about ODS MARKUP Tagsets
      6. Modifying Tagset Events
      7. Creating a Custom Tagset
      8. Using a Custom Tagset Template
      9. More about Tagset Templates
      10. More about Using the Doc="Help" Suboption
  8. Output Style
    1. Style Template Definitions
      1. Viewing a List of Available Style Template Definitions
      2. Changing Style Template Definitions
      3. Examining the Components of an ODS Style Template Definition
      4. Modifying a Style Template Definition: A Simple Example
      5. Finding Your Custom Style Template Definitions
    2. Understanding the Built-In Style Template Definitions
      1. Understanding the Default Style in SAS 9.1.3
      2. Understanding the Default Style in SAS 9.2
      3. Understanding the Default Style in SAS 9.2 (continued)
      4. Understanding the Color Style Elements
      5. Understanding the Font Style Elements
      6. Understanding the HTML and Text Style Elements
      7. Understanding the Abstract Style Elements
      8. Changing Specific Style Elements
      9. Startup and Shutdown Elements
      10. Changing HTML Frames, Indexes, and Tables of Contents
      11. Changing HTML Body Style Attributes
      12. Changing Table Style Elements (Part 1 of 2)
      13. Changing Table Style Elements (Part 2 of 2)
      14. Changing Header-Related and Data Cell-Related Style Elements (Part 1 of 2)
      15. Changing Header-Related and Data Cell-Related Style Elements (Part 2 of 2)
      16. Adding Images to Style Elements
      17. Modifying Titles and Footnotes Using Style Elements (Part 1 of 2)
      18. Modifying Titles and Footnotes Using Style Elements (Part 2 of 2)
      19. Understanding the Differences in the ODS Printer Style
      20. Understanding Differences in the RTF Style
    3. Modifying Output Fonts
      1. Identifying the Font Definitions for Each Part of Your Output
      2. Modifying the Default Font Sizes for HTML Output
      3. Modifying the Default Font Sizes for Printer Output
      4. Modifying the Default Font Sizes for RTF Output
      5. Modifying the Default Typefaces
      6. Identifying Available Fonts
      7. Modifying the Default Font Weights, Font Styles, and Font Widths
      8. Creating a New Font Definition
      9. Modifying Fonts for Procedures That Use Fixed-Width Fonts
    4. Modifying Output Structure
      1. Modifying the Table Borders
      2. Removing the Table Borders and Rules
      3. Removing Table Borders and Rules from Printer Output
      4. Changing the Spacing Inside Tables
      5. Removing Numbers from the Table of Contents in HTML Output
      6. Setting the Width for HTML Output
      7. Controlling RTF Page Margins
      8. Simulating Listing Output with FILE PRINT ODS
      9. Hiding Procedure Titles
    5. Modifying Output Colors and Images
      1. Exploring the Style Elements That Control Color
      2. Modifying the Color of Your Titles
      3. Identifying Colors
      4. Modifying Background Colors
      5. Modifying Colors in Tables
      6. Adding a New Color to the Color Scheme
      7. Designing a Template to Enhance Accessibility
      8. Adding a Logo to Your Output
      9. Adding a Logo and a Custom Heading to Your HTML Output
      10. Adding a Background Image to Your HTML Output
      11. Adding Images to RTF Output (with Templates)
      12. Adding Images to Each Page of Your RTF Output
      13. Adding Images to Printer Output (with Templates)
    6. Doing More with Styles and ODS
      1. Using the CSSSTYLE= Option
      2. Creating a Style Template to Match Corporate Style Guidelines
      3. Using the CSSSTYLE= Option with @media Style Properties
      4. Using Multiple CSS Files with ODS HTML
      5. Using Custom Class Selectors with ODS HTML
      6. Creating a Custom Style for Use with a Custom Table Template
      7. Using Style Templates to Make Smaller Output Files
      8. Inserting an Image with a Style Template
      9. Using RTF Control Strings with a Style Template
      10. Storing and Retrieving a Personal or Group Template
      11. Removing Access to a Personal or Group Template
      12. Specifying an Alternate Template as a Backup
    7. Special Cases: The REPORT, TABULATE, and PRINT Procedures
      1. Changing PROC REPORT Column Heading Style Attributes
      2. Changing PROC REPORT Table Cell Style Attributes
      3. Changing PROC REPORT Row Style Attributes
      4. Changing PROC REPORT Subtotals and Totals Style Attributes
      5. Adding Traffic Lighting to PROC REPORT Table Values
      6. Adding Graphics to PROC REPORT Tables
      7. Creating an Output Data Set from PROC REPORT
      8. Controlling Column Widths with PROC REPORT
      9. Inserting Blank Lines with PROC REPORT
      10. Creating Cleaner PROC REPORT Output Using SPANROWS
      11. Changing PROC TABULATE Row and Column Heading Style Attributes
      12. Changing PROC TABULATE BOX= Option Formatting
      13. Changing PROC TABULATE Table Cell Style Attributes
      14. Changing PROC TABULATE Row Style Attributes
      15. Changing PROC TABULATE Subtotals and Totals Style Attributes
      16. Adding Traffic Lighting to PROC TABULATE Table Values
      17. Adding Graphics to PROC TABULATE Tables
      18. Creating an Output Data Set from PROC TABULATE
      19. Controlling Column Widths with PROC TABULATE
      20. Changing PROC PRINT Column Heading Style Attributes
      21. Changing PROC PRINT Table Cell Style Attributes
      22. Changing PROC PRINT Style Attributes for Totals
      23. Indenting Values with Margin Attributes Using LEFTMARGIN=
      24. Indenting Values with Margin Attributes
      25. Style Attributes for the REPORT, TABULATE, and PRINT Procedures
    8. Understanding ODS Graphics Output
      1. Understanding Graphics Creation in SAS 9.2
      2. Generating Graphics Output from SAS Procedures Using the ODS GRAPHICS Statement
      3. Creating Graphic Images with the ODS Statistical Graphics Framework
      4. Creating Graphics Output with the Statistical Graphics (SG) Procedures
      5. Creating Output Using Graph Templates and the SGRENDER Procedure
      6. Creating HTML Output with SAS/GRAPH
      7. Using ODS Options and SAS/GRAPH Options to Change Output
      8. Understanding Devices and Destinations
      9. More about Devices and Destinations
      10. Creating HTML Output: Graphs as GIFs or JPEGs
      11. Creating HTML Output: Graphs as Java
      12. Creating HTML Output: Graphs as ActiveX
      13. Creating RTF Output: Graphs as ActiveX
      14. Combining Graphs with Text Output
      15. Additional SAS/GRAPH and ODS Resources
    9. Operating System Differences
      1. Setting Up the Example for Windows
      2. Revising the Example for UNIX (HPUX, Sun, Solaris, Linux, etc.)
      3. Revising the Example for z/OS
      4. Revising the Example for OpenVMS
      5. Sources of Additional Information