Chapter 11 ODS and SAS Graphics

Chapter 11 ODS and SAS Graphics - STAT1303 Data Management...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT1303 Data Management 11. ODS and SAS Graphics 11 ODS and SAS Graphics In Chapter 3, we used the procedure PROC UNIVARIATE to produce graphical summary of more numeric variables. However, the formatting of output is rather restrictive. Also, the it would be more Fexible to export the output for the use of other software. Therefore, the purpose of this chapter is to study how SAS procedures can be applied to perform the tasks. 11.1 ODS ODS is the short from of output delivery system which was introduced since SAS v8.2. The usefulness of this system can send the output objects from SAS procedure to HTML, RT±, PD±, SAS data sets, and so on. In the following example, the output of PROC PRINT and PROC MEANS is as an HTML ²le. Example 11.1. Output to HTML. *Example11.1-OutputtoHTML; ods listing close; ods html file=’D:/Temp/eg11-1.html’; proc print label data=mylib.trade(obs=4); label category = ’End-use Category’ type = ’Imports, Retained Imports or Re-exports’; run; proc means data=mylib.om n mean median stddev ; var om3 om10; where (living=1); run; ods html close; ods listing; ODS HTML FILE= statement is used to specify the ²le destination by providing ²lename or ²leref and it should be stated before the procedures whose output to be captured. Once we have put this statement into the SAS program, the output on the Output window after this statement will be sent to the speci²ed ²le until the ODS HTML CLOSE statement. On the other hand, the ODS LISTING CLOSE statement which appears before the ODS HTML FILE= statement can suppress the listing style output. If we want turn on this function again, we need to use the ODS LISTING statement again. HKU STAT1303 (2011-12, Semester 1) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
STAT1303 Data Management 11. ODS and SAS Graphics In addition to simple HTML output, if we want to create a table of content, we need to specify more options of the ODS HTML statement. BODY= option speciFes the main Fle counting the procedure output. CONTENTS= option speciFes table of contents Fle. FRAME= option speciFes frame Fle to display the other 2. The PATH= option speciFes the path to store all 3 Fles. ±inally, STYLE= option speciFes style templates controlling overall appearance. Example values of this option are ANALYSIS / DEFAULT / LISTING and so on. Example 11.2. Create table of content in HTML. *Example11.2-HTMLtableofc o n t e n t ; libname mylib ’D:/temp’; ods html body = ’eg11-2.html’ contents = ’eg11-2_contents.html’ frame = ’eg11-2_frame.html’ path = ’D:/temp’ style = analysis; proc print label data=mylib.trade(obs=4); label category = ’End-use Category’ type = ’Imports, Retained Imports or Re-exports’; run; proc means data=mylib.om n mean median stddev ; var om3 om10; where (living=1); run; ods html close; HKU STAT1303 (2011-12, Semester 1) 2
Background image of page 2
STAT1303 Data Management 11. ODS and SAS Graphics To check the template used in the ODS output, we can submit the command ODSTEMPLATE in the command line.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/09/2012 for the course STAT 1301 taught by Professor Smslee during the Spring '08 term at HKU.

Page1 / 18

Chapter 11 ODS and SAS Graphics - STAT1303 Data Management...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online