SAS ODS. Greg Jenkins



Similar documents
Using SAS/GRAPH Software to Create Graphs on the Web Himesh Patel, SAS Institute Inc., Cary, NC Revised by David Caira, SAS Institute Inc.

Let SAS Write Your SAS/GRAPH Programs for You Max Cherny, GlaxoSmithKline, Collegeville, PA

The Basics of Creating Graphs with SAS/GRAPH Software Jeff Cartier, SAS Institute Inc., Cary, NC

ABSTRACT INTRODUCTION

SAS Mapping: Technologies, Techniques, Tips and Tricks Darrell Massengill

Visualizing Key Performance Indicators using the GKPI Procedure Brian Varney, COMSYS, a Manpower Company, Portage, MI

4 Other useful features on the course web page. 5 Accessing SAS

From The Little SAS Book, Fifth Edition. Full book available for purchase here.

ENHANCING SAS OUTPUT WITH OUTPUT DELIVERY SYSTEM (ODS)

SAS Mapping: Technologies, Techniques, Tips and Tricks

Market Pricing Override

Graphing in SAS Software

Tips and Tricks: Using SAS/GRAPH Effectively A. Darrell Massengill, SAS Institute, Cary, NC

Scatter Plots with Error Bars

OVERVIEW OF THE ENTERPRISE GUIDE INTERFACE

Paper Hot Links: Creating Embedded URLs using ODS Jonathan Squire, C 2 RA (Cambridge Clinical Research Associates), Andover, MA

Creating HTML Output with Output Delivery System

SAS to Excel with ExcelXP Tagset Mahipal Vanam, Kiran Karidi and Sridhar Dodlapati

About XML in InDesign

How to Change the Template and Table of Contents for SAS Web Applications Veronica Y. Rath, INDUS Corporation, Vienna, VA

Using SAS to Create Graphs with Pop-up Functions Shiqun (Stan) Li, Minimax Information Services, NJ Wei Zhou, Lilly USA LLC, IN

Histogram of Numeric Data Distribution from the UNIVARIATE Procedure

PRACTICE CS. Sample Reports. version 2012.x.x

Report Customization Using PROC REPORT Procedure Shruthi Amruthnath, EPITEC, INC., Southfield, MI

(1) latex + dvipdfm (which is a DVI to PDF translator) or (2) pdflatex (a version of LaTeX that generates PDF output instead of DVI).

BI Publisher. Presented to: SCOUG. June 7, 2010

CC03 PRODUCING SIMPLE AND QUICK GRAPHS WITH PROC GPLOT

Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA

Quick Start to Data Analysis with SAS Table of Contents. Chapter 1 Introduction 1. Chapter 2 SAS Programming Concepts 7

Perfecting Report Output to RTF Steven Feder, Federal Reserve Board, Washington, D.C.

Adobe Acrobat X Pro Creating & Working with PDF Documents

Customized Excel Output Using the Excel Libname Harry Droogendyk, Stratia Consulting Inc., Lynden, ON

SAS ODS HTML + PROC Report = Fantastic Output Girish K. Narayandas, OptumInsight, Eden Prairie, MN

Sage Accpac ERP 5.6A. CRM Analytics for SageCRM I User Guide

Making a Web Page with Microsoft Publisher 2003

Learnem.com. Web Development Course Series. Quickly Learn. Web Design Using HTML. By: Siamak Sarmady

Hands-On Workshops HW003

Ten Simple Steps Toward Universal Design of Online Courses

Creating Accessible Word Documents

SAS 9.3 ODS Graphics. Getting Started with Business and Statistical Graphics. SAS Documentation

Create a Pipe Network with Didger & Voxler

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

ODS for PRINT, REPORT and TABULATE

Training/Internship Brochure Advanced Clinical SAS Programming Full Time 6 months Program

Novell ZENworks Asset Management 7.5

ODS, YES! Odious, NO! An Introduction to the SAS Output Delivery System

COGNOS 8 Business Intelligence

Pop-Ups, Drill-Downs, and Animation Mike Zdeb, School of Public Health, Rensselaer, NY

A SAS Based Correspondence Management System Bernd E. Imken, Patented Medicine Prices Review Board, Ottawa, Canada

EXST SAS Lab Lab #4: Data input and dataset modifications

SAS CLINICAL TRAINING

CREATE A WEB PAGE WITH LINKS TO DOCUMENTS USING MICROSOFT WORD 2007

THE SAS OUTPUT DELIVERY SYSTEM: BOLDLY TAKE YOUR WEB PAGES WHERE THEY HAVE NEVER GONE BEFORE! CHEVELL PARKER, SAS INSTITUTE INC.

User s Guide for Program CLAM (Classification Method)

Reporting with Pentaho. Gabriele Pozzani

Ansur Test Executive. Users Manual

Utilizing Clinical SAS Report Templates with ODS Sunil Kumar Gupta, Gupta Programming, Simi Valley, CA

Data analysis and regression in Stata

1 Introduction 2 Installation 3 Getting Started: Default Reports 4 Custom Reports 5 Scheduling Reports

Adobe Conversion Settings in Word. Section 508: Why comply?

9.2 User s Guide SAS/STAT. Introduction. (Book Excerpt) SAS Documentation

SAS Training for Clinical Trials (with Project) - Training Duration: 50 hours

Microsoft Word 2011: Create a Table of Contents

Introduction to SAS Business Intelligence/Enterprise Guide Alex Dmitrienko, Ph.D., Eli Lilly and Company, Indianapolis, IN

SUGI 29 Tutorials. Paper Using Styles and Templates to Customize SAS ODS Output Sunil K. Gupta, Gupta Programming, Simi Valley, CA

Importing Data into R

Short notes on webpage programming languages

How to Color Your Report? By Xuefeng Yu, Celgene Co., Summit, NJ

How To Choose A Business Intelligence Toolkit

Step 3: Go to Column C. Use the function AVERAGE to calculate the mean values of n = 5. Column C is the column of the means.

SPSS Introduction. Yi Li

Importing Data into SAS

NAIP Consortium Strengthening Statistical Computing for NARS SAS Enterprise Business Intelligence

Using Macros to Automate SAS Processing Kari Richardson, SAS Institute, Cary, NC Eric Rossland, SAS Institute, Dallas, TX

BusinessObjects Enterprise InfoView User's Guide

Unit 351: Website Software Level 3

Microsoft Power Point 2007: The Basics

Generating lesson plans with. Adobe Acrobat

Data Export User Guide

Construction Planning, Equipment and Methods ENGI 8749 Fall Semester, 2008 Tutorial #2 Resource Leveling using MS Project

Using the Acrobat tab in Microsoft Word: Setting PDF Preferences

WHO WE ARE. INTRODUCTION Throughout the year, numerous official data files and hard copy

Action settings and interactivity

InfoView User s Guide. BusinessObjects Enterprise XI Release 2

Create a PDF File. Tip. In this lesson, you will learn how to:

Reporting Manual. Prepared by. NUIT Support Center Northwestern University

How To Use Spss

Transcription:

SAS ODS Greg Jenkins 1

Overview ODS stands for the Output Delivery System ODS allows output from the Data Step & SAS procedures to presented in a more useful way. ODS also allows for some of the output of SAS procedures to be stored in SAS data sets. Although this is an improvement over the regular SAS output it still has it s limitations. 2

Uses of ODS ODS can arrange output in a prettier way. It also can create output in a variety of formats, such as: html, pdf, rtf, etc. As stated earlier it can also create output datasets that generally can also be created within most of the SAS procedures. 3

General Idea of ODS Prior to version 7 of SAS output was the results of a SAS procedure and was stored in a basic output file (or output window). ODS now creates output objects from procedures that have basically three components: data component, table definition (order of columns, rows, etc.), and an output destination (.html,.rtf, etc.) 4

General Use of ODS To start output being delivered to ODS the general syntax is: ods output-format <options>; To end output being delivered to ODS: ods output-format close; 5

Example To send the output of a procedure to ODS and create an.html file: ods html file = body.htm contents = contents.htm frame = frame.htm ; proc print data =new;run; ods html close; 6

Other.html File Options Other options that are provided are to change the style of the html output, just add a style=style-type to the opening ods statement. To see the SAS styles available use the following code: proc template; list styles; run; Style sheets can also be used by adding a stylesheet=filename(url=url-name) line to the opening ods statement. 7

RTF Files This creates prettier output that can be read by MS Word and other word processing programs. The general syntax is: ods rtf file= rtf-filename.rtf ; sas-code ods rtf close; 8

PDF Files This creates prettier output that can be read by Adobe Acrobat Reader, one caveat of using this is that you need the Adobe Acrobat Distiller. The general syntax is: ods pdf file= pdf-filename.pdf ; sas-code ods pdf close; 9

Enough with the Regular Output What About Graphics? Works the same way as any other procedure although, the sizing of your graph probably won t be what you want, ODS fits output to 8½ x 11(use goptions to change this). For html output you need to specify a path for your graphics, generally the same path as where you put your other html files, add the following line to your opening ods line: gpath = path-name (i.e. gpath= C:/sasclass/ ) 10

Enough with the Regular Output What About Graphics? RTF Example ods rtf file= U:/rtffile.rtf ; proc gplot data = data1; plot y*x; run; ods rtf close; 11

Enough with the Regular Output What About Graphics? HTML Example ods html file= U:/web/body.htm gpath= U:/web/ ; proc gplot data = data1; plot y*x; run; ods html close; 12

Some Other Options for HTML Graphics Another thing you can do with HTML output is create drill down graphs. This is done using the actually gplot or gchart procedure. A variable must be created in the SAS dataset that the gplot/gchart procedure is using, indicating the link requested. 13

Drill-Down Chart Example Data temp; length mylink $40.; if z = 1 then mylink = href= mylink1.htm ; else if z = 2 then mylink = href. ods html file= U:/body.htm gpath= U:/ ; proc gchart; hbar z/html=mylink; run; ods html close; 14

What if I Don t Want All the ODS Tables Created by a Procedure Use the select or exclude statements in the different ods opening statements. In order to exclude and select tables you need to know their names. The help generally gives you names of the tables but you can also use the ods trace command: ods trace output; 15

Example of Selecting a Table ods listing select Moments ; proc univariate; var age; run; 16

How About those Output Datasets? Just as in the case of using select and exclude statements you ll need to know the tables that you want to create datasets from, but the general syntax is: ods output table-name=dataset-name; 17

Example of Output Dataset ods output Moments=mom; proc univariate; var age; run; ods output close; 18

The Output is Nice But How Can I Change It? To create your own ODS schemes, you need to create what is called a template (don t confuse this with the SAS/GRAPH templates). To create and modify templates you need to use the procedure proc template. 19

Proc Template Two parts to ODS output: an overall style, and individual table definitions. The overall style consists of general formats like: colors for backgrounds, default fonts, etc. Individual table definitions are things like: the order of columns in a table, SAS format to use for column headings, etc. 20

Proc Template Templates are stored like other SAS files, but can have multiple level names. The main unit of a template group is a template store. Within the template store may be many templates, where styles, table elements, etc. are stored. It s basically like a directory for templates. 21

Proc Template The basic syntax used to create a template is the following: proc template; define definition-type definition-path </store=libname-template-store>; 22

Example of Style Definition libname in U:/mytemplates ; Proc template; define style mystyle.testout store=in.mystore; style celldatasimple / font_face=arial background=very light vivid blue foreground=white; run; 23

Proc Template There are a lot of options using this procedure, it appears that you can have a lot of control over how things are formatted. However, it s not that simple to figure out, SAS online doc has a lot of information on this or look at Heffner 1998 The Complete Guide to the SAS Output Delivery System. Also code of default styles and table definitions can be looked at using proc template and the source command: proc template; source template-name; 24