Managing Your SAS Output with the Document Procedure PhilaSUG Meeting March 15, 2011.

Slides:



Advertisements
Similar presentations
Creating Data Entry Screens in Epi Info
Advertisements

Overview This presentation will be answering these main questions about AutoDoc: What does it do? What is it? How does it do it? Starting from the finish.
Microsoft Word By: Phuong Nguyen.
Axio Research E-Compare A Tool for Data Review Bill Coar.
Developing an Excel Application
Tutorial 8: Developing an Excel Application
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
® Microsoft Office 2010 Excel Tutorial 2: Formatting a Workbook.
SAS Output Delivery System. Find heart in the sashelp library Double click.
Using Proc Datasets for Efficiency Originally presented as a Coder’s NESUG2000 by Ken Friedman Reviewed by Karol Katz.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
Other Features Index and table of contents Macros and VBA.
Microsoft Office Illustrated Fundamentals Unit B: Understanding File Management.
© 2002 ComputerPREP, Inc. All rights reserved. Word 2000: Forms, Merges, and Macros.
© 2002 ComputerPREP, Inc. All rights reserved. Word 2000: Working with Long Documents.
Defining Styles and Automatically Creating Table of Contents and Indexes Word Processing 4.03.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
Mail merge letters are used to send the same or similar documents to many different people. Since they contain the recipient’s name, address, and other.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Creating a PowerPoint Presentation
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Report Management Using the ODS DOCUMENT Destination and Report Metadata Brit Harvey February 2010.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 3: Customizing Document Elements.
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
Moodle (Course Management Systems). Managing Your class In this Lecture, we’ll cover course management, including understanding and using roles, arranging.
Microsoft Word ITE115 Trisha Cummings. MsWord - Word Processing Program Allows you to create Letters, Envelopes, Mailing Labels, Memo’s , Fax’s.
PowerBuilder Online Courses - by Prasad Bodepudi
01/20151 EPI 5344: Survival Analysis in Epidemiology SAS code and output February 24, 2015 Dr. N. Birkett, School of Epidemiology, Public Health & Preventive.
Business Documents with Word
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
SAS Software Version 8 The Output Delivery System.
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 19 Organizing and Enhancing Worksheets 1 Morrison / Wells / Ruffolo.
Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
1 EPIB 698E Lecture 1 Notes Instructor: Raul Cruz 7/9/13.
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.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
1 Chapter 7: Customizing and Organizing Project Results 7.1 Combining Results 7.2 Updating Results 7.3 Customizing the Output Style (Self-Study)
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
Module ESSENTIALSBEYOND THE ESSENTIALS © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
An Introduction Katherine Nicholas & Liqiong Fan.
> > >> < <
Customize SAS Output Using ODS Joan Dong. The Output Delivery System (ODS) gives you greater flexibility in generating, storing, and reproducing SAS procedure.
Mr. Munaco Computer Technology TEACHING ADVANCED WORD 2007.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
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.
Made with OpenOffice.org 1 Beyond the Single Page Steve Oualline OpenOffice Writer.
Chapter 5: Enhancing Your Output with ODS
Tutorial 2: Formatting a Workbook
An Introduction to Computers and Visual Basic
Lesson 2 Tables and Charts
Word Processing.
An Introduction to Computers and Visual Basic
Microsoft Word Illustrated
Defining Styles and Automatically Creating Table of Contents and Indexes Word Processing 4.03.
SAS Output Delivery System
Tamara Arenovich Tony Panzarella
An Introduction to Computers and Visual Basic
Using Templates and Library Items
Microsoft Office Illustrated Fundamentals
Microsoft Excel 2007 – Level 2
Presentation transcript:

Managing Your SAS Output with the Document Procedure PhilaSUG Meeting March 15, 2011

Outline Review of Output Delivery System What is the ODS Document and what can it do for you? Quick-Start course Listing and Replaying Documents Additional Capabilities – quick overview only How to find out more Q&A

Scenario – Which one is my analysis for TODAY's meeting?

3/15/114 What can be stored in a Document? SAS/Graph Graphics ODS Statistical GraphicsSAS Data Sets (small) Text Notes “As you can see from the previous output, the clustering is quite strong” SAS Procedural Output

Using The Document Procedure is EASY Save Output Now: ODS DOCUMENT NAME=philasug.mystuff; ODS DOCUMENT CLOSE; Replay Output Later proc document name=philasug.mystuff; replay; run; quit;

3/15/11 Two Approaches to Learning PROC Document “Google Approach” Use no folders, and use the WHERE statement to create searches to specify which output is replayed Good for beginners, so you can focus on ODS rather than file management Approach used in this presentation “Yahoo Approach” Use lots of folders, set them up before you even start adding output to the document Direct output to the propre folder with the ODS Document command Combination Most people will use a combination of these!

3/15/117 What sort of Output does the Document Store? To replay output, you need all three. The Document saves the first two, and some formats. Template Information ODS Table or Graph Formats Titles & Footnotes Object Notes Context

3/15/118 How the Output Delivery System Works Without The ODS Document

3/15/119 With the ODS Document

3/15/1110 Organization of the ODS Document Like a directory Output from Each SAS Procedure has its own Each folder Named for its procedure Can have more than one folder with PROC REG output, for instance Each output object and directory has a path-name, derived from ODS naming conventions

3/15/1111 Talking to the Output Delivery System Every output has an ODS pathname ods trace on; proc univariate data=sashelp.class; by sex; var height age; run; ods trace off;

3/15/1112 Ods Stores data in the document based on the ODS Pathname Output Added: (you can find this message in the Sas LOG) Name: Moments Label: Moments Template: base.univariate.Moments Path: Univariate.ByGroup1.Height.Moments Terminology of the ODS part II All four of these terms, Name, Label, Template, and Path can be used to search the document,hence worth learning Example ODS Trace output: Use it to teach you ODS names of output you commonly use.

3/15/1113 The ODS Document Statement, Building a Document ods document name= PROC …. DATA Steps with ODS output ODS Document Close; ODS Document exclude/exclude statements; ODS Include PARAMETERESTIMATES; Proc reg;...

3/15/11 Access Modes READ (read-only) access WRITE – not what it sounds! - ERASES the ENTIRE document, then inserts the new data. Should be called Over-write mode. Update – The default Will continually append new output after old output

3/15/11 Quick Aside – deleting a Document proc datasets lib=nesug mtype=itemstor; delete firstdoc; quit ; /* can also rename */ SAS ODS Documents are of type ITEMSTORE, which when abbreviated to eight letters is ITEMSTOR. The only place you need to know this fact is for this delete. For most document management tasks, use PROC DOCUMENT, NOT PROC DATASETS.

3/15/1116 List contents of document (LIST) commad Replay documents (REPLAY) command Create Labels for each output object Create, Manage, and Delete Folders Create Shortcuts to subfolders, Notes, Titles all without re-running the original analysis Make changes to graphs (SAS 9.3) Jobs of the Document Procedure

3/15/1117 Invoking The Document Procedure PROC DOCUMENT Name= ;

3/15/1118 LIST Command PROC DOCUMENT Name= ; LIST paths / options ; Run ; Quit ; Levels= n | ALL Details BYGroups Most Useful Options MUST HAVE!

3/15/1119 Output from LIST; with no options One directory (pathname) for each PROC called Levels=1 is the default Automatically generated Sequence Numbers ensure all objects have unique names Name of base directory (default is root directory)

3/15/1120 LIST / DETAILS LEVELS=ALL;

3/15/1121 What Happens when you Replay? To replay output, you need both. The power of PROC Document comes from the ability to change information in the Pink Square to modify appearance while leaving blue square alone. Style! Fonts Highlighting Fill Colors Actual Template Stored in Document Document Says: “I need Base.Sas.Reg to complete my work. ODS Says “I have that on file!”

3/15/1122 REPLAYING Output Proc document name=; Replay; Run; Quit;

3/15/11 Replaying The Document ods html body= style=BarrettsBlue; /*for SH */ ods rtf body= style=Printer; ods listing; /* needed for EG, since not turned on by default */ proc document name=nesug.firstdoc (read); list / order=alpha; replay / dest=(listing rtf html); run; quit; ods _all_ close; 2 1 3

3/15/1124 Restricting Output HIDE Command HIDE PATH; prevents the path and all its subfolders from being replayed HIDE REG#1; UNHIDE Command Opposite of Mr. Jekkyl

3/15/1125 The WHERE statement New as in 9.2 Can condition replay based on Dates of creation or modification Name of object (and this is why ODS Trace is so helpful) Label of object Pathname of Object By-Groups variables(if original code used BY groups) Can also be used on file management commands, so we can conditionally LIST.

3/15/1126 WHERE Statement Variables _CDATE_Creation Date _CDATETIME_Creation Date/Time _CTIME_Creation Time _LABELPATH_Path Name, in Label format _MDATE_,_MDATETIME_, _MTIME_ Similar to Cdate* variables, but cover modification time. _NAME_Name of current entry. The name is the rightmost entry of the path name. _PATH_Pathname of current entry _SEQNO_Sequence number of current entry _TYPE_Type of object: TABLE or DIRECTORY Variable nameThe variable name used as a by group. This is valid only when BY group analysis is used to create the output.

3/15/1127 WHERE Statement Examples Example 4. 1 Searching By Path list ^(where=(_path_ ? "Height")) / levels=all; run; /* quit */ Example 4. 2 Tables Only list ^(where=(_type_ = "Table")) / levels=all; Example 4. 3 Tables with BY Groups list ^ (where=(_type_ eq 'Table')) / levels=all bygroups; ^ represents the current directory. Usually can be dropped, but the WHERE statement needs a token before it.

3/15/1128 WHERE Statement Examples Example 4 By Group Example:Female Only list ^ (where=(_type_ = "Table") & (sex="F"))/ levels=all bygroups; Example 5 Univariate Output, Created Before September 6, list Univariate#1(where=(_cdate < '06Sep2010'd)); Example 4. 6 Using ODS Name objects. list reg#2(where=(_NAME_in ('FitStatistics','ParameterEstimates'));

3/15/1129 Make your own directories Create copies and links for faster reporting Modify Titles, formats, headers, columns, styles without altering output or rerunning original analysis Combining several reports into one for easy comparison Enhance output with traffic lighting, but without modifying the original data or defining new formats.s Intermediate Topics

3/15/1130 Finding out More Andrew Karp - “A Peek at the Document Procedure” - SGF 2007 #224 SAS Support ODS Document Tip Sheet tips.pdfhttp://support.sas.com/rnd/base/ods/scratch/document- tips.pdfNew from SAS Press: PROC Document using SAS – Available for Pre-order at NESUG 2011