Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada.

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
Introduction to HTML & CSS
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Robby Seitz 121 Powers Hall ADVANCED WEB DESIGN USING DREAMWEAVER
© 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post.
Web Design HTML Basic Robertus Setiawan Aji Nugroho References: w3schools.com.
How to Create a Custom Style Sonia Extremera / Antonio Nieto / Javier Gómez PhUSE Annual Conference, 9th-12th Oct 2011, Brighton UK.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
COMP 4—Power Tools for the Mind 1 Power Tools Word Processing What we’ll cover for this lecture topic: –Types and Examples of Application software –Creating.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Create a Web Site with Frames
Quark QuarkXPress 4 Foundation Level Course. What is QuarkXPress? This courseware teaches the fundamentals of QuarkXPress 4.1. It is a page layout application.
Customize your SAS® Output with the Template Procedure: A Beginning Tutorial Carol Gosselin North Carolina State University, Raleigh, NC Joy Munk Smith.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Chapter 3 Dreamweaver: Part I The Web Warrior Guide to Web Design Technologies.
Multimedia & The World Wide Web winny HCI 201 Multimedia and the www.
Web Technologies Website Development Trade & Industrial Education
Website Development with Dreamweaver
Using a Template to Create a Resume and Sharing a Finished Document
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
COMMON APPLICATION FUNCTIONS Presentation. Bullets  Symbols used to organize data into a list.  This  Is  An  Example  Of  A  Bullet  List.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Excel 2010 © 2011 The McGraw-Hill Companies,
Dreamweaver MX Unit B CIS 205—Web Site Design and Development.
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
PROC TEMPLATE: The Basics Lauren Haworth Genentech, Inc. South San Francisco, CA.
ODS Statistical Graphics in SAS 9.2 January 17, 2010.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
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.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 19 Organizing and Enhancing Worksheets 1 Morrison / Wells / Ruffolo.
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower ;
Priya Ramaswami Janssen R&D US. Advantages of PROC REPORT -Very powerful -Perform lists, subsets, statistics, computations, formatting within one procedure.
1 CA201 Word Application Arranging and Printing Documents Week # 4 By Tariq Ibn Aziz Dammam Community college.
CERTIPORT EXCEL PRACTICE. EDITING SORT/FILTER/FIND & REPLACE In the Summary worksheet, sort the data in descending order by Order Number, and then in.
Chapter 11 Using SAS ® Web Report Studio. Section 11.1 Overview of SAS Web Report Studio.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Tutorial 3 Adding and Formatting Text with CSS Styles.
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)
By: Ms. Abeer Helwa 1. WORD WEB APP 2 Word Web App is a limited version of Word, enabling you to edit, format, and share documents online. Word Web App.
Word 2003 The Word Screen. Word 2003 Screen File Menu –Holds the options for creating a new document, opening a document, saving a document, printing.
By: Ms. Abeer Helwa 1. WORD WEB APP 2 Word Web App is a limited version of Word, enabling you to edit, format, and share documents online. Word Web App.
Customize SAS Output Using ODS Joan Dong. The Output Delivery System (ODS) gives you greater flexibility in generating, storing, and reproducing SAS procedure.
Positioning Objects with CSS and Tables
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
WaveMaker Visual AJAX Studio 4.0 Training Styling your application.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
Working with Cascading Style Sheets
CNIT 131 HTML5 - Tables.
Applying CSS to Tables Stylish Tables.
Fonts, Pictures, Styles, Files, Spelling, and More!
Creating Database Reports
Microsoft PowerPoint 2007 – Unit 2
Lesson 19 Organizing and Enhancing Worksheets
Microsoft Publisher 2016.
Presentation transcript:

Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada

Objective demonstrate the power of Proc Template to customize SAS output format outline the general framework for how this is done and introduce some key concepts for starting with Proc Template.

Output Delivery System (ODS)

ODS Destinations Report Destinations ListingHTML Printer Data Destination Output RTF

Output Listing HTML RTF Destination Output Object Data Component Template Components SAS Data Set Output Window HTML File RFT File Result ODS Output Production * Pre-defined templates provided, but can customize

Why Use ODS and Proc Template? form and appearance matter. automate the formatting process production jobs applications make results accessible to users in their preferred form. no post-production point-and-click.

Template Types Table column header footer Style Presentation Colors Fonts There are specific table template for each type of output object. A single style template affects the general look of all the output within a given document.

style template table template style elements attributes values table header footercolumn attributes values attributes values attributes values attributes values The general structure of templates

Objectives projected airfares on all flight routes in 3 seat classes over 4 years. a frequency report for number of employees in different job classes. Projected Ticket Rates Route First Class Business Economy First Class Business Economy Number Fare Year 1 Fare Year1 Fare Year1 Fare Year2 Fare Year2 Fare Year $1, $1, $ $1, $1, $ $1, $1, $ $1, $1, $ $1, $1, $ $2, $1, $ $1, $1, $ $2, $1, $ $ $ $58.00 $ $ $ $ $ $58.00 $ $ $ Counts by Job Code Job Code Job Cumulative Cumulative Code Frequency Percent Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ BAGCLK BAGSUP CHKCLK CHKSUP FACCLK

Objectives (cont’d) standard templates Create the SAS output in HTML format and RTF (Rich Text Format) using standard templates supplied by SAS. heading text data formats order of columns banner image banner image (HTLM) background image background image (HTML) panels (RTF) page orientation (RTF) modified templates Create and use modified templates to produce the HTML and RTF output. font color traffic lighting

The Plan: Step 1 - create procedure output as text. Step 2 - create RTF and HTML output with “default” templates.

The Plan: Step 3 - Part A - modify style template to specify: font font size landscape layout (RFT) banner and background images (HTML). Part B - apply new style template to create output. Step 4 - Part A - modify table template for Proc Freq to specify: order and format of columns header text 2 panels per page (RTF) traffic lighting. Part B - apply new table template to create output.

Output Listing HTML RTF Destination Output Object Data Component Template Components SAS Data Set Output Window HTML File RTF File Result ODS Output Production proc report, proc freq style template, table template

Step 1 - create procedure output as text. proc report data=airline.rates(obs=50) nowd split=' '; title 'Projected Ticket Rates'; columns rte_id _numeric_; define rte_id / id; run; proc freq data=airline.employees; table JobCode; title 'Counts by Job Code'; run;

ODS RTF file=‘something.rtf’; ODS HTML file=‘something.html’; ODS RFT CLOSE; ODS HTML CLOSE; Step 2 - create RTF and HTML output with “default” templates.

Step 3 - Part A - modify style template to specify font, font size, landscape layout (RFT), and banner and background images (HTML). PROC TEMPLATE; DEFINE STYLE style-name; PARENT=parent; REPLACE element1 attribute1=value attribute2=value …; REPLACE element2 attribute1=value attribute2=value …; END; RUN; Element attribute value _ documentbackground imagesomething.gif column headerstext colorblue background colorwhite fontLucidia Console cell bordersthickness2 pixels colorblack

Step 3 - Part B - apply new style template to create output. ODS RTF file=‘something.rtf’ style=newstyle; ODS HTML file=‘something.html’ style=newstyle; ODS RFT CLOSE; ODS HTML CLOSE;

Step 4 - Part A - modify table template for Proc Freq to specify order and format of columns, header text, 2 panels per page (RTF), and traffic lighting. PROC TEMPLATE; EDIT TABLE template-name; MVAR; COLUMN column(s); DEFINE header; attribute1=value …; END; EDIT column; HEADER='label text'; FORMAT=format.; … other change statements… END; END; RUN; Attributes and values can be specified for: the entire table table headers and footers individual column headers and column values

Step 4 - Part B - apply new table template to create output. SAS matches up the data component of each output object with the template component by name. User modified table templates retain the same name as the originals, but they are stored in a different location. By default, SAS will find and use the user defined table templates first. No need to specify the new table template. An ODS PATH statement can be used to control which templates SAS is able to find and use.

Process: what do I want to change? what are the corresponding style elements of the style template? (and/or) what is the name of the table template and the names of the headers or columns within that I want to change? what particular attributes do I want to specify for these style elements, or for the tables, table headers, or table columns? what are valid values to set for these attributes? *Everything in red italics has a specific name

style template table template style elements attributes values table header footercolumn attributes values attributes values attributes values attributes values The general structure of templates This is the forest. Don’t get lost among the many trees

Template inheritance: within a style template, elements inherit attributes and their values from other elements. both style and table templates may also inherit elements and their attributes from other templates.

proc template; define style Styles.Default;.. style Container font = Fonts('DocFont') foreground = colors('docfg') background = colors('docbg'); style Index from Container foreground = colors('contentfg') background = colors('contentbg');.. proc template; define style Styles.Rtf; parent = styles.printer; style titleAndNoteContainer from titleAndNoteContainer / outputwidth = _undef_; replace cell from container / linkcolor = colors('link2'); Inheritance within a style template: Inheritance from another style template:

Inheritance from another table template: proc template; edit Base.Freq.OneWayFreqs;...

Help and documentation: SAS Online Doc - Guide to the Output Delivery System. includes syntax full lists of elements, attributes, and values. (hardcopy useful) Interactive Template Window and Template Browser Window. get to know the default templates you need to work with copy and paste required code. Classroom Training: Getting Started with the Output Delivery System.

Other references: URLs of Interest: odsxml/xml.pdf odsprinter/faq.html odscss/ odsfordata/ods.pdf style-template/style.html v6v8ods/index.html V7/V8 and ODS papers to download: