Chapter 5: Enhancing Your Output with ODS

Slides:



Advertisements
Similar presentations
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Advertisements

How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
Basics of R, Ch  Functions  Help  Managing your Objects  Getting Data into R  Getting Results out of R 1 © Fall 2004 Don Edwards and the University.
MATLAB’s extensive, device-independent plotting capabilities are one of its most powerful features. They make it very easy to plot any data at any time.
How to prepare a PowerPoint presentation
Converting Microsoft Office Documents Bill Weber E-Learning Systems Administrator E-Learning Operations.
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
How to convert a Word file to PDF. Log in to an iSolutions workstation and start Adobe Acrobat from the Start menu.
Word Templates- Documents Directly from GP.
Creating an Expression Web Site
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
How to Prepare a PowerPoint Presentation on Office 2003 (PC) by Lawrence W. McAllister English Bridge Program - SFU June 4, 2009 NOTE: MAC is similar but.
Basic Presentation Design Concepts and Functions.
Within Oracle Applications: Run a Standard Report.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
Katherine Nicholas. Outline: 1. What is ODS 2. Basic syntax 3. Saving output to files 4. Built-in graphics 5. Identifying objects in output 6. Outputting.
01/20151 EPI 5344: Survival Analysis in Epidemiology SAS code and output February 24, 2015 Dr. N. Birkett, School of Epidemiology, Public Health & Preventive.
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower ;
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
What is PowerPoint? By Kettina L. Robinson. Unit Questions What do I want to accomplish? What do I want to accomplish? What content do I need to cover?
Chapter 7: Macros in SAS  Macros provide for more flexible programming in SAS  Macros make SAS more “object-oriented”, like R 1 © Fall 2011 John Grego.
Customize SAS Output Using ODS Joan Dong. The Output Delivery System (ODS) gives you greater flexibility in generating, storing, and reproducing SAS procedure.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Pasewark & Pasewark 1 Word Lesson 7 Working with Documents Microsoft Office 2007: Introductory.
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
ODS TAGSETS - a Powerful Reporting Method Derek. 2 Agenda Understanding the tagset How to use tagsets Conclusion.
1 SAS ® ODS Technology for Today’s Decision Makers Sunil Gupta Quintiles.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
Using SAS to Create Multi-Sheet Excel Workbooks
SAS and Other Packages SAS can interact with other packages in a variety of different ways. We will briefly discuss SPSSX (PASW) SUDAAN IML SQL will be.
Chapter 3: Getting Started with Tasks
Microsoft Word Objectives: Word processing using Microsoft Word
How to get started with RefWorks
Setting Defaults in Microsoft Word for Accessibility
What Should I Do if My Style Is Not Included?
Using ODS Excel Migrating from DDE to ODS
Practical Office 2007 Chapter 10
Chapter 6: Modifying and Combining Data Sets
Microsoft Word: Templates
How to get started with RefWorks
Chapter 8: ODS Graphics ODS graphics were not available prior to SAS 9.2 They have been implemented across a wide range of procedures Functionality isn’t.
Cartography and Labeling
Chapter 3: Working With Your Data
Microsoft Word: Templates
Tables, Smart Art and Templates
How to Import an Excel File
SAS Output Delivery System
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Chapter 1: Introduction to SAS
Tamara Arenovich Tony Panzarella
Chapter 7: Macros in SAS Macros provide for more flexible programming in SAS Macros make SAS more “object-oriented”, like R Not a strong suit of text ©
Chapters 5 and 7 supplement
صندوق ضمانت سرمایه گذاری صنایع کوچک
Embedding Graphics in Web Pages
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
Beautiful PROC CONTENTS Output Using the ODS Excel Destination
InControl R2 Contact Center Reports Overview
Eviews Tutorial for Labor Economics Lei Lei
Basics of R, Ch Functions Help Managing your Objects
Basic Presentation Design
Stata Basic Course Lab 2.
Print, , Save Results TUTORIAL ToxPlanet Documents Print, , Save Results
Powering Africa This template can be used as a starter file to give updates for project milestones. Sections Sections can help to organize your slides.
Instructor: Raul Cruz 9/4/13
Exploring Microsoft Word 2003
Basic Presentation Design
BPKC NUMERICAL ANALYSIS ASSIGNMENT-3
Presentation transcript:

Chapter 5: Enhancing Your Output with ODS ODS (Output Delivery System) can simply be a way to save high-quality output to different files: RTF files PS (Postscript files) PDF files HTML files (be sure to look at the text’s example in 5.5 ) OUTPUT (SAS data sets) © Fall 2011 John Grego and the University of South Carolina

Chapter 5: Enhancing Your Output with ODS ODS uses style templates to enhance default formats (for those who want to do EVERYTHING in SAS—or those who need to). It is also an effective means to control output printed to the OUTPUT window (LISTING files) or written to SAS data sets. © Fall 2011 John Grego and the University of South Carolina

Why ODS? We have already learned a couple menu-driven applications of ODS Selecting Create HTML.. to save output in HTML format in Exercise 6. Right-clicking on a graphics window and saving it as a PDF file The second example is analogous to saving graphics in R

Why ODS? While menu-driven options are convenient, they do have shortcomings when: Generating many graphics in a large program Generating graphics in a DO loop—remember the Monitoring Well data in R? Generating graphics in a MACRO We need in-line commands to save output files as well

Creating an output file The basic structure of an ODS command can be quite simple ODS PDF FILE=‘\stat540\filename.pdf’; (SAS graphics commands) RUN; ODS PDF CLOSE;

Creating an output file This basic syntax is commonly used for postscript, html, and rtf files as well Note the similarity to the use of the pdf() and postscript() functions in R In addition to saving filename.pdf, an attractive PDF window will open in SAS

Creating an output file We can include multiple PROC steps inside the ODS commands and generate multiple graphs

Creating an output file An additional precaution: turn off the default output device (and restore it when finished) ODS LISTING CLOSE; ODS PDF FILE=‘z:\stat 540\fname.pdf’; .. ODS PDF CLOSE; ODS LISTING;

Selecting Output SAS PROC’s can produce many separate pieces of output; some more useful than others We can use ODS SELECT to choose pieces to output

Selecting Output ODS TRACE identifies output names for ODS SELECT Use of ODS TRACE has been somewhat superceded by availability of ODS table names in SAS documentation for its PROC steps We will review both methods

Selecting Output The “trace” is printed in the LOG window—and it is quite cryptic! Once you get used to the naming convention, it’s not so bad ODS TRACE ON; (SAS PROC statements) RUN; ODS TRACE OFF;

Saving Output ODS OUTPUT can save multiple output files Remember that these output data sets can look odd… …but judicious use of IF can take care of that

Saving Output ODS OUTPUT can save name, label, and path output pieces Using the name acts as a grouping variable in our example (SAS PROC statements) ODS name=your_out_name path=your_out_path; RUN;

Enhancing Output ODS HTML output can be enhanced with STYLE statements These styles can be complex, but some simple improvements can be made PROC PRINT can be enhanced with STYLE statements too (Class Exercise 9)

Enhancing Output PROC FORMAT can be used for “traffic-lighting” cells in HTML output Chapter 8 has an extensive new section on ODS graphics; some of the earlier sections discuss simple ways to enhance the usual line-plotter graphics from, e.g., PROC UNIVARIATE