ODS in an Instant! Bernadette H. Johnson, The Blaze Group, Inc., Raleigh, NC

Similar documents
Quick Results with the Output Delivery System

Quality Control of Clinical Data Listings with Proc Compare

ODS EXCEL DESTINATION ACTIONS, OPTIONS, AND SUBOPTIONS

ABSTRACT INTRODUCTION THE ODS TAGSET FACILITY

Essentials of the SAS Output Delivery System (ODS)

Making a SYLK file from SAS data. Another way to Excel using SAS

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

Exporting Variable Labels as Column Headers in Excel using SAS Chaitanya Chowdagam, MaxisIT Inc., Metuchen, NJ

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA

Overview 14 Table Definitions and Style Definitions 16 Output Objects and Output Destinations 18 ODS References and Resources 20

Essential ODS Techniques for Creating Reports in PDF Patrick Thornton, SRI International, Menlo Park, CA

Beginning Tutorials. bt006 USING ODS. Ban Chuan Cheah, Westat, Rockville, MD. Abstract

How to Create a Custom Style

Professional outputs with ODS LATEX

Presentation Quality Bulleted Lists Using ODS in SAS 9.2. Karl M. Kilgore, PhD, Cetus Group, LLC, Timonium, MD

My Reporting Requires a Full Staff Help!

The GANNO Procedure. Overview CHAPTER 12

Getting Started with the SAS 9.4 Output Delivery System

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

ET01. LIBNAME libref <engine-name> <physical-file-name> <libname-options>; <SAS Code> LIBNAME libref CLEAR;

Chapter 28 Saving and Printing Tables. Chapter Table of Contents SAVING AND PRINTING TABLES AS OUTPUT OBJECTS OUTPUT OBJECTS...

Formatting Highly Detailed Reports: Eye-Friendly, Insight-Facilitating

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY

SAS/STAT 14.1 User s Guide. Using the Output Delivery System

Setting the Percentage in PROC TABULATE

CSSSTYLE: Stylish Output with ODS and SAS 9.2 Cynthia L. Zender, SAS Institute Inc., Cary, NC

Getting Started with the SAS 9.4 Output Delivery System

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc.

The Perfect Marriage: The SAS Output Delivery System (ODS) and

ODS for PRINT, REPORT and TABULATE

Perceptive Document Composition

MEDIA KIT 2018 CLOUDSCENE.COM

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research

PharmaSUG China Paper 059

ODS TAGSETS - a Powerful Reporting Method

Six Cool Things You Can Do In Display Manager Jenine Milum, Charlotte, NC Wachovia Bank

Lab: Information Design Tool Create a Static List with Multiple Columns. Scenario. Objectives

A Macro to Manage Table Templates Mark Mihalyo, Community Care Behavioral Health Organization, Pittsburgh, PA

The correct bibliographic citation for this manual is as follows: SAS Institute Inc Proc FORMS. Cary, NC: SAS Institute Inc.

Part 1. Introduction. Chapter 1 Why Use ODS? 3. Chapter 2 ODS Basics 13

A Fully Automated Approach to Concatenate RTF outputs and Create TOC Zhiping Yan, Covance, Beijing, China Lugang Xie, Merck, Princeton, US

The FORMS Procedure. Overview CHAPTER 20

Creating Zillions of Labels (and Other Documents) the Easy Way with ODS and Microsoft Word

Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS. Vincent DelGobbo, SAS Institute Inc.

9. Producing HTML output. GIORGIO RUSSOLILLO - Cours de prépara+on à la cer+fica+on SAS «Base Programming» 207

A Macro to replace PROC REPORT!?

Data Presentation. Paper

SAS Theme Designer 3.1 for Flex

Paper ###-YYYY. SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI

SAS Forecast Server 3.1. Administrator s Guide to Report Administration Tasks

An Introduction to Creating Multi- Sheet Microsoft Excel Workbooks the Easy Way with SAS

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency.

9. Producing HTML output. GIORGIO RUSSOLILLO - Cours de prépara+on à la cer+fica+on SAS «Base Programming» 208

An Application of ODS Tagsets. Notice! Paper

A Practical Introduction to SAS Data Integration Studio

Enterprise Guide Version 2.0 for Windows

SAS Enterprise Guide 3.0 for Windows

Delivering Information to the People Who Need to Know Carol Rigsbee, SAS Institute Chris Hemedinger, SAS Institute

Delivering Information to the People Who Need to Know Carol Rigsbee, SAS Institute Chris Hemedinger, SAS Institute

Fly over, drill down, and explore

The GTESTIT Procedure

Run your reports through that last loop to standardize the presentation attributes

SAS Theme Designer 4.7 for Flex

How to avoid wide format PDF printing problems

Paper HOW-06. Tricia Aanderud, And Data Inc, Raleigh, NC

Getting Started with the XML Engine

ODS for Dummies. Copyright 2000 SAS EMEA

Version 8 ODS (Output Delivery System)

EXST SAS Lab Lab #6: More DATA STEP tasks

Introduction to Statistical Graphics Procedures

Output Delivery System: The Basics and Beyond Lauren E. Haworth Cynthia L. Zender Michele M. Burlew

Getting Started with the Output Delivery System

QUERIES BY ODS BEGINNERS. Varsha C. Shah, Dept. of Biostatistics, UNC-CH, Chapel Hill, NC

Perceptive Document Composition

Custom Label and Paper Sizes Guide

Syntax Conventions for SAS Programming Languages

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

WINDEV 23 - WEBDEV 23 - WINDEV Mobile 23 Documentation version

Producing Summary Tables in SAS Enterprise Guide

Storing and Reusing Macros

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA

Tips and Techniques for Designing the Perfect Layout with SAS Visual Analytics

Enterprise Client Software for the Windows Platform

Creating Accessible Microsoft Word 2003 Documents Table of Contents

Style Report Enterprise Edition

FPO. Cable Cubby 1200 Cable Cubby Elegant Cable Management Solutions for High-Profile Environments

Perceptive Process Mining

Figure 1. Table shell

Journey to the center of the earth Deep understanding of SAS language processing mechanism Di Chen, SAS Beijing R&D, Beijing, China

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA

Presentation Goals. Now that You Have Version 8, What Do You Do? Top 8 List: Reason #8 Generation Data Sets. Top 8 List

Chapter 6 Creating Reports. Chapter Table of Contents

SAS Viya 3.1 FAQ for Processing UTF-8 Data

HTML for the SAS Programmer

An Introduction to SAS/SHARE, By Example

EtatRequete.book Page 1 Mardi, 6. avril :01 15 Reports and Queries

Paper SIB-096. Richard A. DeVenezia, Independent Consultant, Remsen, NY

Uncommon Techniques for Common Variables

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

Transcription:

Paper 210-28 ODS in an Instant! Bernadette H. Johnson, The Blaze Group, Inc., Raleigh, NC ABSTRACT Do you need to generate high impact word processor, printer- or web- ready output? Want to skip the SAS Output Delivery System (ODS) learning curve? Make it happen with Instant ODS!. What is Instant ODS!? A suite of ready-to-run ODS style templates, developed to provide instant access to a wide variety of business-ready style templates. Your SAS output is automatically formatted in the selected style and ready for a word-processor, PDF or the web. See how easy it is to create your own stylized results. If you are a new SAS user or an experienced SAS user new to ODS, then this is for you! INTRODUCTION The SAS Output Delivery System provides the tools to customize your output layout and to generate output in RTF, PDF and HTML formats making it easier to share and edit documents and to assimilate SAS output into other business documents. With this power comes the challenge of learning how to build these layouts, called templates, using the TEMPLATE procedure. Most users have neither the time nor the inclination to learn the over 100 report components and all the associated settings. To assist users, SAS supplies 17 style templates. Now, more pre-customized style templates are available using Instant ODS!. This paper provides: an overview of the Output Delivery System and templates instructions on using ODS with the SAS supplied templates an introduction to Instant ODS!. OVERVIEW OF SAS OUTPUT-- PAST AND PRESENT Before Version 7, SAS output was generated for line printers. Tables were a combination of spaces and characters. Column widths were difficult to change and fixed width fonts were required to maintain proper column spacing. Version 7 of SAS introduced the Output Delivery System (ODS). Using ODS, many output destinations are now available, such as: Rich Text Format (RTF- Microsoft Word-Ready) Output HTML Output for the web PDF Output (Adobe Acrobat-Ready) SAS Datasets. ODS separates the data from the output formatting making it possible for users to have more control. One way to control output formatting is with templates. WHAT IS AN ODS TEMPLATE? Templates are stored collections of formatting instructions that control the individual components of a report. There are over 100 individual components or style elements that can be customized to meet your reporting needs. There are two main types of ODS templates: style templates and table templates. Style templates provide output specifications and formatting for the entire SAS program. Table templates provide specifications for individual tables or selected procedure output within a program. WHAT IS CONTROLLED BY STYLE TEMPLATES? Style templates provide specifications for the following style elements for the entire SAS job: Fonts Colors Borders Margins Background colors and images Cell spacing and padding HTML links, body, contents and page settings. WHAT IS CONTROLLED BY TABLE TEMPLATES? Table templates provide specifications for selected tables: Order of data columns Assigning attributes to selected columns, headers, and cells Formatting data values Assigning table attributes (colors, fonts, etc.) based on data values (traffic lighting). USING ODS: DEFAULT TEMPLATES Use the ODS statement to specify an output destination and output filename. When the STYLE= setting is omitted, your output is automatically formatted using the default SAS style templates for the selected destination. To create an RTF file using the default, try the following: ODS RTF file= myoutput1.rtf ; proc print data=sashelp.class; run; ODS RTF close; The output is stored in file myoutput1.rtf. A sample of the resulting RTF output is below. Obs Name Sex Age Height Weight 1 Alice F 13 56.5 84.0 2 Barbara F 13 65.3 98.0 3 Carol F 14 62.8 102.5 4 Jane F 12 59.8 84.5 5 Janet F 15 62.5 112.5 1

USING ODS: SAS SUPPLIED STYLE TEMPLATES SAS provides the following 17 styles templates with version 8.2 to produce stylized output: BarrettsBlue Brick D3d Minimal Printer Sasweb Theme sansprinter serifprinter Beige Brown Default NoFontDefault Rtf Statdoc fancyprinter sasdocprinter These style templates can be used to create HTML, RTF, and PDF output. To create an RTF file using a SAS supplied template, try the following: ODS RTF style=minimal file= myoutput2.rtf ; proc print data=sashelp.class; run; ODS RTF close; A sample of the resulting RTF output is below. Obs Name Sex Age Height Weight 1 Alice F 13 56.5 84.0 2 Barbara F 13 65.3 98.0 3 Carol F 14 62.8 102.5 4 Jane F 12 59.8 84.5 5 Janet F 15 62.5 112.5 USING ODS: INSTANT ODS! Instant ODS! is a suite of 50 ready-to-use ODS style templates that provides instant access to pre-defined styles designed for RTF, PDF, and HTML output destinations. To apply the pre-defined templates, follow these steps: 1. Assign a libname to defined the directory path of the Instant ODS! template library. 2. Use the ODS PATH statement to define a template library search order and access permission. Use (read) to permit read-only access to the template libraries. SASHELP.TMPLMST contains the SAS supplied templates. 3. Use the ODS statement to specify a destination, style name and output file name. 4. Run your selected SAS program code 5. Close the ODS output destination. EXAMPLE: RTF OUTPUT To create an RTF file using Instant ODS! template, COLOR_7, try the following: LIBNAME INSTANT c:\instantods ; ODS PATH INSTANT.ODS(read) SASHELP.TMPLMST(read); ODS RTF style=color_7 file= myoutput2.rtf ; *(1) Create a libref pointing to the directory containing the Instant ODS! templates; * (2) Define template library search path to retrieve templates from the Instant ODS! templates first, then the SAS supplied templates in SASHELP.TMPLMST. Access both libraries in read-only mode.; * (3) Use the ODS statement to specify a destination (RTF), template style name (COLOR_7) and filename (myoutput2.rtf).; <proc print program> * (4) add your program code here ; ODS RTF CLOSE; * (5) close the output destination.; 2

A sample of the resulting RTF output is below. Distances between Major Cities Starting City Destination City Distance (miles) Distance (km) New York, New York, USA Copenhagen, Denmark 3,856 2,396 Dallas/Fort Worth, Texas, USA 1,383 859 Frankfurt, Germany 3,857 2,397 Los Angeles, California, USA 2,475 1,538 London, England, UK 3,442 2,139 Chicago, Illinois, USA 740 460 Paris, France 3,635 2,259 Washington, DC, USA 229 142 Toronto, Canada 366 227 London, England, UK Frankfurt, Germany 210 130 Hong Kong, China 5,980 3,716 Mexico City, Mexico 5,540 3,443 Nome, Alaska, USA 4,380 2,722 Rome, Italy 890 553 3

EXAMPLE: HTML OUTPUT To create an HTML file using Instant ODS! template, COLOR_7, try the following: LIBNAME INSTANT c:\instantods ; ODS PATH INSTANT.ODS(read) SASHELP.TMPLMST(read); ODS HTML style=color_7 FRAME= myhtml.htm PAGE= myhtmlpage.htm CONTENTS= myhtmlcontents.htm BODY= myhtmlbody.htm ; <proc print program> ODS HTML CLOSE; A sample of the resulting HTML output is below. 4

EXAMPLE: PDF OUTPUT To create a PDF file using Instant ODS! template, COLOR_7, try the following: LIBNAME INSTANT c:\instantods ; ODS PATH INSTANT.ODS(read) SASHELP.TMPLMST(read); ODS PDF style=color_7 file= color_7.pdf ; <proc print program> ODS PDF CLOSE; A sample of the resulting PDF output is below. 5

CONCLUSION The Output Delivery System makes it possible to create business-ready output for popular output destinations such as: RTF, PDF and HTML. The SAS supplied templates provide default formats for getting started. Instant ODS! provides 50 additional style templates to add professional, consistent appeal to output generated from your SAS programs. REFERENCES For more information on using the SAS Output Delivery System, see The Complete Guide to the SAS Output Delivery System, Version 8 Cary, NC: SAS Institute Inc. For more information on using ODS Templates, see Output Delivery System: The Basics Lauren E. Haworth Cary, NC: SAS Institute Inc. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Bernadette H. Johnson The Blaze Group, Inc. 424-109 East Six Forks Rd. PMB 285 Raleigh, NC 27609 Email: BJohnson@BlazeGroup.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. 6