Introduction to sas ods computing for research i
Download
1 / 14

Introduction to SAS ODS Computing for Research I - PowerPoint PPT Presentation


  • 71 Views
  • Uploaded on

Introduction to SAS ODS Computing for Research I. Annie N. Simpson, MSc. 1/31/11. Some ODS is still “Experimental”. What is ODS?. ODS=Output Delivery System SAS procedures produce output objects

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Introduction to SAS ODS Computing for Research I' - myra-boone


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Introduction to sas ods computing for research i

Introduction to SAS ODSComputing for Research I

Annie N. Simpson, MSc.

1/31/11



What is ods
What is ODS?

  • ODS=Output Delivery System

  • SAS procedures produce output objects

  • ODS allows these objects to be wrangled, organized, and used in many ways…printing, producing graphics files, creating new data from Procedures, etc.

  • Makes SAS Output “Prettier”

    • ODS Output to files

    • ODS Output to new SAS data sets

    • ODS Graphics


How to send sas results to files
How to send SAS results to files…

Odsrtffile=‘complete file path’;

Procedures you want written out to the file;

ODSrtfclose;

Destinations include-

ODS DOCUMENT, ODS HTML, ODS LATEX, ODS LISTING, ODS PCL, ODS PDF, ODS PS, and ODS RTF


Example
Example

ProcFormat;

Value $coffee 'esp'='Espresso'

'cap'='Cappuccino'

'kon'='Kona'

'ice'='Ice Coffee'

;

Value $Deliv 'w'='Walk-in'

'd'='Drive-up'

;

Run;

Odsrtffile = ‘C:\Data\CoffeeFreq.rtf’;

ProcFreqData = coffee;

Tables TypeD TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

;

Run;

ODSrtfclose;


How to send output to data sets
How to send output to data sets?

  • First have to know what the SAS object is called

    • Use ODS Trace to find out what OBJECTS SAS is creating when you run a PROC or DATA step.

    • Knowing this information will allow you to select only the information you want to work with.


Ods trace syntax
ODS Trace Syntax

***Trace Results will be in the LOG***;

ODS TRACE ON;

*Procedures and/or Data steps go here;

ODS TRACE OFF;

***Trace Results will be in the Listing***;

ODS TRACE ON / Listing;

*Procedures and/or Data steps go here;

ODS TRACE OFF;


Example1
Example

ODSTraceon;

ProcFreqData = coffee;

Tables TypeD /chisq;

Tables TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

Label TypeC = "Type of Coffee"

TypeD = "Type of Delivery"

;

Run;

ODSTraceoff;



Introduction to sas ods computing for research i

Libname Annie “C:\DATA”; into a new output data set…

ODSOutput"One-Way Frequencies"=Annie.Freqs;

ProcFreqData = coffee;

Tables TypeD /chisq;

Tables TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

Label TypeC = "Type of Coffee"

TypeD = "Type of Delivery";

Run;

ODSOutputclose;


How about ods graphics
How about ODS Graphics? into a new output data set…

ODS graphics on;

procregdata=fitness;

model Oxygen=RunTime Age RestPulse;

run;

Quit;

ODS graphics off;


Ods graphics
ODS Graphics into a new output data set…

  • How do we Name graphs?

  • How do we Save graphs?

  • How do we Change styles?

  • How do we Edit graphs?

  • Lets Take a look at the ODS demo sample code…

  • Practice looking up ODS info in SAS Online Documentation

  • See SAS User Group Paper for full ODS Graphics Information.


Insert practice gif image here
Insert practice .gif image here… into a new output data set…