ODS Primer Enio Presutto York University September 21, 2001
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.
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.
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
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.
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.
ODS – Proc Print before ODS proc print data=tass.tass(obs=5); proc print data=tass.tass(obs=5); run; run;
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 Ricky Nelson Eddie Hodges Eddie Hodges Jimmy Dean Jimmy Dean Roy Orbison Roy Orbison Bobby Edwards Bobby Edwards 1961
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
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 Beau-Marks Bobby Edwards Chubby Checker Clarence "Frogman" Henry Del Shannon Dion Eddie Hodges Elvis Presley Everly Brothers Highwaymen Jimmy Bell Jimmy Dean Marcells Neil Sedaka Patsy Cline Ramrods Ricky Nelson Roy Orbison String-A-Longs
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
ODS – HTML Destination ods listing close; ods listing close; filename results 'd:\ tass\saspgms\html1.html'; filename results 'd:\ 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
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\ tass\saspgms\html1.html' ods html body='d:\ 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
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\ tass\saspgms\html3.html' ods html body='d:\ tass\saspgms\html3.html' (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September ODS Presentation'; title 'T.A.S.S. September 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
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\ tass\saspgms\html4-body.html' ods html body='d:\ tass\saspgms\html4-body.html' contents='d:\ tass\saspgms\html4-contents.html' contents='d:\ tass\saspgms\html4-contents.html' frame='d:\ tass\saspgms\html4-frame.html'; frame='d:\ tass\saspgms\html4-frame.html'; (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September ODS Presentation'; title 'T.A.S.S. September 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
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\ tass\saspgms\html5-body.html' ods html body='d:\ tass\saspgms\html5-body.html' contents='d:\ tass\saspgms\html5-contents.html' contents='d:\ tass\saspgms\html5-contents.html' frame='d:\ tass\saspgms\html5-frame.html'; frame='d:\ tass\saspgms\html5-frame.html'; (title='Proc Print to HTML'); (title='Proc Print to HTML'); title 'T.A.S.S. September ODS Presentation'; title 'T.A.S.S. September 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
ODS – HTML Destination ods listing close; ods listing close; ods html body='d:\ tass\saspgms\html6.html' ods html body='d:\ 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
ODS – HTML Destination ods listing close; ods listing close; goptions device=gif; goptions device=gif; ods html body='d:\ tass\saspgms\html7.html' ods html body='d:\ 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
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
ODS – HTML Destination filename graphic 'd:\ tass\saspgms\html7.html' mod; filename graphic 'd:\ 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:\ tass\saspgms\' gpath='d:\ 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
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
ODS – RTF destination ods listing close; ods listing close; filename results 'd:\ tass\saspgms\rtf1.rtf'; filename results 'd:\ 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
ODS – RTF destination libname tass 'D:\ tass\sasdata'; libname tass 'D:\ tass\sasdata'; run; run; ods listing close; ods listing close; filename results 'd:\ tass\saspgms\rtf2.rtf'; filename results 'd:\ tass\saspgms\rtf2.rtf'; proc format; proc format; value traffic low = 'cxCC0000' /* green */ value traffic low = 'cxCC0000' /* green */ ='cxFF9900‘ /* yellow */ ='cxFF9900‘ /* yellow */ high= 'cx006600‘ ; /* red */ high= 'cx006600‘ ; /* red */ run; run;Note Traffic lighting Traffic lighting
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
ODS – PDF destination libname tass 'D:\ tass\sasdata'; libname tass 'D:\ tass\sasdata'; run; run; ods listing close; ods listing close; filename results 'd:\ tass\saspgms\pdf2.pdf'; filename results 'd:\ 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
References Output Delivery System By Lauren E. Haworth