Download presentation
Presentation is loading. Please wait.
Published byCameron Wood Modified over 8 years ago
1
ODS Primer Enio Presutto York University September 21, 2001
2
Legal Stuff The Presenter, The SAS Institute, and the Management of BCE Place assume no responsibility if someone gets hit by flying raisins, chocolate Bars, etc. The Presenter, The SAS Institute, and the Management of BCE Place assume no responsibility if someone gets hit by flying raisins, chocolate Bars, etc.
3
For Your Information GLASGOW, Scotland (Reuters) -- Good news for chocoholics. The treat favored by millions is also good for you, researchers said on Monday. Chocolate contains compounds called flavonoids that can help maintain a healthy heart and good circulation and reduce blood clotting -- which can cause heart attacks and strokes. "More and more, we are finding evidence that consumption of chocolate that is rich in flavonoids can have positive cardiovascular effects," Carl Keen, a nutritionist at the University of California, Davis, told a science conference here. "We not only have observed an increase in antioxidant capacity after chocolate consumption, but also modulation of certain compounds which affect blood vessels." Antioxidants are substances that help reduce the damage of cancer-causing charged particles in the body. Fruits, vegetables, nuts and whole grains are high in antioxidant vitamins such as C and E. Not all chocolate created equal Flavonoids in chocolate are derived from cocoa, which is rich in the compounds. Research has shown that a small bar of dark chocolate contains as many flavonoids as six apples, 4.5 cups of tea, 28 glasses of white wine and two glasses of red. GLASGOW, Scotland (Reuters) -- Good news for chocoholics. The treat favored by millions is also good for you, researchers said on Monday. Chocolate contains compounds called flavonoids that can help maintain a healthy heart and good circulation and reduce blood clotting -- which can cause heart attacks and strokes. "More and more, we are finding evidence that consumption of chocolate that is rich in flavonoids can have positive cardiovascular effects," Carl Keen, a nutritionist at the University of California, Davis, told a science conference here. "We not only have observed an increase in antioxidant capacity after chocolate consumption, but also modulation of certain compounds which affect blood vessels." Antioxidants are substances that help reduce the damage of cancer-causing charged particles in the body. Fruits, vegetables, nuts and whole grains are high in antioxidant vitamins such as C and E. Not all chocolate created equal Flavonoids in chocolate are derived from cocoa, which is rich in the compounds. Research has shown that a small bar of dark chocolate contains as many flavonoids as six apples, 4.5 cups of tea, 28 glasses of white wine and two glasses of red.
4
ODS - What is it? In previous versions of SAS Datastep and procedures produced output directly In previous versions of SAS Datastep and procedures produced output directly Output was produced for mainframe printing using line printers (monospaced fonts) Output was produced for mainframe printing using line printers (monospaced fonts) Graphics were produced for plotters Graphics were produced for plotters Very little control over appearance Very little control over appearance
5
ODS – Output Delivery System Scopo della giornata di corso è quello di introdurre le tecniche per utilizzare questa nuova funzionalità disponibile con la Versione 8 di SAS per la produzione di output (listati, tabelle, pagine HTML, dataset SAS) e la generazione di template e stili per la produzione automatica di questi tipi di output. Scopo della giornata di corso è quello di introdurre le tecniche per utilizzare questa nuova funzionalità disponibile con la Versione 8 di SAS per la produzione di output (listati, tabelle, pagine HTML, dataset SAS) e la generazione di template e stili per la produzione automatica di questi tipi di output.
6
ODS – Output Delivery System Version 8 saw introduction of ODS Version 8 saw introduction of ODS Datastep and procedures now produce output objects Datastep and procedures now produce output objects ODS processes these output objects and produces required output ODS processes these output objects and produces required output ODS can produce in the following formats HTML, PDF, RTF, CSV, JPEG, GIF, Postscript, XML, etc. ODS can produce in the following formats HTML, PDF, RTF, CSV, JPEG, GIF, Postscript, XML, etc.
7
ODS – Proc Print before ODS proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run;
8
ODS – Proc Print before ODS The SAS System The SAS System Obs number Title Obs number Title 1 1 Hello Mary Lou/Travelin' Man 1 1 Hello Mary Lou/Travelin' Man 2 2 I'm Gonna Knock On Your Door 2 2 I'm Gonna Knock On Your Door 3 3 Big Bad John 3 3 Big Bad John 4 4 Crying/Candy Man 4 4 Crying/Candy Man 5 5 You're The Reason 5 5 You're The Reason Obs Artist year Obs Artist year 1 Ricky Nelson 1961 1 Ricky Nelson 1961 2 Eddie Hodges 1961 2 Eddie Hodges 1961 3 Jimmy Dean 1961 3 Jimmy Dean 1961 4 Roy Orbison 1961 4 Roy Orbison 1961 5 Bobby Edwards 1961 5 Bobby Edwards 1961
9
ODS – Proc Freq before ODS proc freq data=tass.tass(obs=20); tables artist; tables artist; run; Output produced is suitable for line printers Output produced is suitable for line printers is monospaced is monospaced Only one great font Only one great font No colour No colour Limited to 133 columns Limited to 133 columns
10
ODS – Proc Freq before ODS The SAS System The SAS System The FREQ Procedure The FREQ Procedure Artist Artist Cumulative Cumulative Cumulative Cumulative Artist Frequency Percent Frequency Percent ----------------------------------------------------------------------------- Andy Stewart 1 5.00 1 5.00 Beau-Marks 1 5.00 2 10.00 Bobby Edwards 1 5.00 3 15.00 Chubby Checker 1 5.00 4 20.00 Clarence "Frogman" Henry 1 5.00 5 25.00 Del Shannon 1 5.00 6 30.00 Dion 1 5.00 7 35.00 Eddie Hodges 1 5.00 8 40.00 Elvis Presley 1 5.00 9 45.00 Everly Brothers 1 5.00 10 50.00 Highwaymen 1 5.00 11 55.00 Jimmy Bell 1 5.00 12 60.00 Jimmy Dean 1 5.00 13 65.00 Marcells 1 5.00 14 70.00 Neil Sedaka 1 5.00 15 75.00 Patsy Cline 1 5.00 16 80.00 Ramrods 1 5.00 17 85.00 Ricky Nelson 1 5.00 18 90.00 Roy Orbison 1 5.00 19 95.00 String-A-Longs 1 5.00 20 100.00
11
ODS – Defaults Version 8 procedure output defaults to ODS LISTING destination Version 8 procedure output defaults to ODS LISTING destination No changes required to your program No changes required to your program
12
ODS – HTML Destination ods listing close; ods listing close; filename results 'd:\2001-09-21 tass\saspgms\html1.html'; filename results 'd:\2001-09-21 tass\saspgms\html1.html'; ods html body=results; ods html body=results; proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run; ods html close; ods html close; run; run; View Results View Results View Results View Results
13
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\2001-09-21 tass\saspgms\html1.html' ods html body='d:\2001-09-21 tass\saspgms\html1.html' (title='Proc Print to HTML'); (title='Proc Print to HTML'); proc print data=tass.tass(obs=5 ); proc print data=tass.tass(obs=5 ); run; run; ods html close; ods html close; run; run; Title option changes text used in browser title bar Title option changes text used in browser title bar View Results View Results View Results View Results
14
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\2001-09-21 tass\saspgms\html3.html' ods html body='d:\2001-09-21 tass\saspgms\html3.html' (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September 2001 - ODS Presentation'; title 'T.A.S.S. September 2001 - ODS Presentation'; proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run; proc freq data=tass.tass(obs=10); proc freq data=tass.tass(obs=10); tables artist; tables artist; run; run; ods html close; ods html close; run; run; View Results View Results View Results View Results
15
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\2001-09-21 tass\saspgms\html4-body.html' ods html body='d:\2001-09-21 tass\saspgms\html4-body.html' contents='d:\2001-09-21 tass\saspgms\html4-contents.html' contents='d:\2001-09-21 tass\saspgms\html4-contents.html' frame='d:\2001-09-21 tass\saspgms\html4-frame.html'; frame='d:\2001-09-21 tass\saspgms\html4-frame.html'; (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September 2001 - ODS Presentation'; title 'T.A.S.S. September 2001 - ODS Presentation'; title2 'Proc Print output'; title2 'Proc Print output'; proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run; title2 'Proc freq output'; title2 'Proc freq output'; proc freq data=tass.tass(obs=10); proc freq data=tass.tass(obs=10); tables artist; tables artist; run; run; ods html close; ods html close; run; run; View Results View Results View Results View Results
16
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\2001-09-21 tass\saspgms\html5-body.html' ods html body='d:\2001-09-21 tass\saspgms\html5-body.html' contents='d:\2001-09-21 tass\saspgms\html5-contents.html' contents='d:\2001-09-21 tass\saspgms\html5-contents.html' frame='d:\2001-09-21 tass\saspgms\html5-frame.html'; frame='d:\2001-09-21 tass\saspgms\html5-frame.html'; (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September 2001 - ODS Presentation'; title 'T.A.S.S. September 2001 - ODS Presentation'; title2 'Proc Print output'; title2 'Proc Print output'; ods proclabel 'Listing of Songs'; ods proclabel 'Listing of Songs'; proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run; title2 'Proc freq output'; title2 'Proc freq output'; ods proclabel 'Frequency Report'; ods proclabel 'Frequency Report'; proc freq data=tass.tass(obs=10); proc freq data=tass.tass(obs=10); tables artist; tables artist; run; run; ods html close; ods html close; run; run; View results View results View results View results
17
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\2001-09-21 tass\saspgms\html6.html' ods html body='d:\2001-09-21 tass\saspgms\html6.html' (title='Proc Print to HTML'); (title='Proc Print to HTML'); title ' Song titles taken from 1050 Chum Charts '; title ' Song titles taken from 1050 Chum Charts '; proc print data=tass.tass(obs=5 ) noobs label; proc print data=tass.tass(obs=5 ) noobs label; var title artist year; var title artist year; label artist=' Artist Name '; label artist=' Artist Name '; run; run; ods html close; ods html close; run; run; View results View results View results View results
18
ODS – HTML Destination ods listing close; ods listing close; goptions device=gif; goptions device=gif; ods html body='d:\2001-09-21 tass\saspgms\html7.html' ods html body='d:\2001-09-21 tass\saspgms\html7.html' (title='Proc Print to HTML' (title='Proc Print to HTML' no_bottom_matter); no_bottom_matter); title ' Song titles taken from 1050 Chum Charts '; title ' Song titles taken from 1050 Chum Charts ';NOTES: No_bottom_matter – tells ods not to generate closing html tags No_bottom_matter – tells ods not to generate closing html tags
19
ODS – HTML Destination proc print data=tass.tass(obs=5 ) noobs label; proc print data=tass.tass(obs=5 ) noobs label; var title artist year; var title artist year; label artist=' Artist Name '; label artist=' Artist Name '; run; run; ods html close; ods html close;Notes Ods destination is closed Ods destination is closed
20
ODS – HTML Destination filename graphic 'd:\2001-09-21 tass\saspgms\html7.html' mod; filename graphic 'd:\2001-09-21 tass\saspgms\html7.html' mod; title 'Song titles taken from 1050 chum charts'; title 'Song titles taken from 1050 chum charts'; ods html file=graphic (no_top_matter) ods html file=graphic (no_top_matter) gpath='d:\2001-09-21 tass\saspgms\' gpath='d:\2001-09-21 tass\saspgms\' (url=none); (url=none);NOTES Use filename to append to html file created on previous page Use filename to append to html file created on previous page Use no_top_matter to tell ods not to generate opening tags in html file Use no_top_matter to tell ods not to generate opening tags in html file (url=none) – tells ods not to use URLs, but to use filenames instead, it you specify a url then ods will use it to build the html page names (url=none) – tells ods not to use URLs, but to use filenames instead, it you specify a url then ods will use it to build the html page names
21
ODS – HTML Destination proc gchart data=tass.tass; proc gchart data=tass.tass; vbar3d year / vbar3d year / name='Year Recorded'; name='Year Recorded'; run; quit; run; quit; ods html close; ods html close; run; run; View Results View Results View Results View Results
22
ODS – RTF destination ods listing close; ods listing close; filename results 'd:\2001-09-21 tass\saspgms\rtf1.rtf'; filename results 'd:\2001-09-21 tass\saspgms\rtf1.rtf'; ods rtf file=results; ods rtf file=results; proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run; ods rtf close; ods rtf close; run; run; View results View results View results View results
23
ODS – RTF destination libname tass 'D:\2001-09-21 tass\sasdata'; libname tass 'D:\2001-09-21 tass\sasdata'; run; run; ods listing close; ods listing close; filename results 'd:\2001-09-21 tass\saspgms\rtf2.rtf'; filename results 'd:\2001-09-21 tass\saspgms\rtf2.rtf'; proc format; proc format; value traffic low-100000 = 'cxCC0000' /* green */ value traffic low-100000 = 'cxCC0000' /* green */ 100001-240000='cxFF9900‘ /* yellow */ 100001-240000='cxFF9900‘ /* yellow */ 240001-high= 'cx006600‘ ; /* red */ 240001-high= 'cx006600‘ ; /* red */ run; run;Note Traffic lighting Traffic lighting
24
ODS – RTF destination ods rtf file=results; ods rtf file=results; proc tabulate data=tass.popular; proc tabulate data=tass.popular; class name /STYLE=[FONT_FACE="Times New Roman"]; class name /STYLE=[FONT_FACE="Times New Roman"]; var amount /STYLE=[FONT_FACE="Helvetica"]; var amount /STYLE=[FONT_FACE="Helvetica"]; tables name='Item Name' all, amount='Amount Sold'*sum* tables name='Item Name' all, amount='Amount Sold'*sum* [STYLE=[FOREGROUND=TRAFFIC. FONT_WEIGHT=bold]]; [STYLE=[FOREGROUND=TRAFFIC. FONT_WEIGHT=bold]]; run; run; ods rtf close; ods rtf close; run; run; View Results View Results View Results View Results
25
ODS – PDF destination libname tass 'D:\2001-09-21 tass\sasdata'; libname tass 'D:\2001-09-21 tass\sasdata'; run; run; ods listing close; ods listing close; filename results 'd:\2001-09-21 tass\saspgms\pdf2.pdf'; filename results 'd:\2001-09-21 tass\saspgms\pdf2.pdf'; ods pdf file=results notoc; ods pdf file=results notoc; proc tabulate data=tass.popular; proc tabulate data=tass.popular; class name /STYLE=[FONT_FACE="Times New Roman"]; class name /STYLE=[FONT_FACE="Times New Roman"]; var amount /STYLE=[FONT_FACE="Helvetica"]; var amount /STYLE=[FONT_FACE="Helvetica"]; tables name='Item Name' all, amount='Amount Sold'*sum* tables name='Item Name' all, amount='Amount Sold'*sum* [STYLE=[FOREGROUND=TRAFFIC. FONT_WEIGHT=bold]]; [STYLE=[FOREGROUND=TRAFFIC. FONT_WEIGHT=bold]]; run; run; ods pdf close; ods pdf close; run; run; View results View results View results View results
26
References Output Delivery System By Lauren E. Haworth
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.