<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: data _null_ and RTF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/data-null-and-RTF/m-p/2279#M995</link>
    <description>Hi!&lt;BR /&gt;
  The advent of ODS brought changes to data _null_ syntax for custom tabular reports.&lt;BR /&gt;
  &lt;BR /&gt;
  With "classic" DATA _NULL_ reporting statements, you could create custom tabular and custom "free-format" reports using FILE PRINT and PUT statements.&lt;BR /&gt;
  &lt;BR /&gt;
  With ODS and DATA _NULL_ you can generate custom tabular reports. For custom "free-format" reports you have to wait for the capability described here:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/022-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/022-28.pdf&lt;/A&gt; (Although, I understand that what's cooking now may be a bit different than what's described in the paper. But you'll get the general idea.)&lt;BR /&gt;
&lt;BR /&gt;
  For more information about DATA _NULL_ and custom table templates, I did a SUGI paper on this subject a few years ago and you can download the paper here:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/088-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/088-30.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  The Tech Support FAQ for ODS also has some good examples.&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts664.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts664.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://ftp.sas.com/techsup/download/v7papers/ODS_DATA.pdf" target="_blank"&gt;http://ftp.sas.com/techsup/download/v7papers/ODS_DATA.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/faq/036/FAQ03611.html" target="_blank"&gt;http://support.sas.com/faq/036/FAQ03611.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/templateFAQ/Template.html" target="_blank"&gt;http://support.sas.com/rnd/base/topics/templateFAQ/Template.html&lt;/A&gt; (follow the links for ODS and the DATA Step)&lt;BR /&gt;
  &lt;BR /&gt;
Good luck! Here's a program that shows the basic syntax. &lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
title;&lt;BR /&gt;
footnote;&lt;BR /&gt;
ods noproctitle;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
               &lt;BR /&gt;
** make some test data;&lt;BR /&gt;
data work.sales; &lt;BR /&gt;
  set sashelp.shoes(rename=(sales=sales1));&lt;BR /&gt;
  where product contains 'Dress';&lt;BR /&gt;
  year1=2003;&lt;BR /&gt;
  sales2=sales1*1.05;&lt;BR /&gt;
  year2=year1+1;&lt;BR /&gt;
  sales3=sales2*1.05;&lt;BR /&gt;
  year3=year2+1;&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
proc means data=work.sales noprint nway;&lt;BR /&gt;
  class Region;&lt;BR /&gt;
  var sales1 sales2 sales3;&lt;BR /&gt;
  id year1 year2 year3;&lt;BR /&gt;
  output out=work.salessummary&lt;BR /&gt;
         sum=sum_sales1 sum_sales2 sum_sales3 &lt;BR /&gt;
         mean=mean_sales1 mean_sales2 mean_sales3;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
** this shows the "new" syntax for data _null_ and ODS;&lt;BR /&gt;
** there is more you can do, but this is the basics.;&lt;BR /&gt;
** With custom table templates added into the mix, ;&lt;BR /&gt;
** you can do more to create custom tabular reports;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods rtf file='c:\temp\only_year3.rtf';&lt;BR /&gt;
ods html file='c:\temp\only_year3.html';&lt;BR /&gt;
ods pdf file='c:\temp\only_year3.pdf';&lt;BR /&gt;
title 'Only Year 3 Dress Shoes Projected Sales';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set work.salessummary;&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(variables=(Region&lt;BR /&gt;
	               year3 sum_sales3 mean_sales3));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                     &lt;BR /&gt;
ods rtf file='c:\temp\year1_year3.rtf';&lt;BR /&gt;
ods html file='c:\temp\year1_year3.html';&lt;BR /&gt;
ods pdf file='c:\temp\year1_year3.pdf';&lt;BR /&gt;
title 'Compare Year 1 (Actual) and Year 3 (Projected)';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set work.salessummary;&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(variables=(Region&lt;BR /&gt;
                       year1 sum_sales1 mean_sales1&lt;BR /&gt;
	               year3 sum_sales3 mean_sales3));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
ods listing;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Fri, 09 Feb 2007 22:16:38 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-02-09T22:16:38Z</dc:date>
    <item>
      <title>data _null_ and RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/data-null-and-RTF/m-p/2278#M994</link>
      <description>How can I produce report written in data _null_ to go to Word isung ODS RTF. Is there any way I can do this. The summary report is custom made.&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 09 Feb 2007 21:30:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/data-null-and-RTF/m-p/2278#M994</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-02-09T21:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: data _null_ and RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/data-null-and-RTF/m-p/2279#M995</link>
      <description>Hi!&lt;BR /&gt;
  The advent of ODS brought changes to data _null_ syntax for custom tabular reports.&lt;BR /&gt;
  &lt;BR /&gt;
  With "classic" DATA _NULL_ reporting statements, you could create custom tabular and custom "free-format" reports using FILE PRINT and PUT statements.&lt;BR /&gt;
  &lt;BR /&gt;
  With ODS and DATA _NULL_ you can generate custom tabular reports. For custom "free-format" reports you have to wait for the capability described here:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/022-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/022-28.pdf&lt;/A&gt; (Although, I understand that what's cooking now may be a bit different than what's described in the paper. But you'll get the general idea.)&lt;BR /&gt;
&lt;BR /&gt;
  For more information about DATA _NULL_ and custom table templates, I did a SUGI paper on this subject a few years ago and you can download the paper here:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/088-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/088-30.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  The Tech Support FAQ for ODS also has some good examples.&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts664.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts664.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://ftp.sas.com/techsup/download/v7papers/ODS_DATA.pdf" target="_blank"&gt;http://ftp.sas.com/techsup/download/v7papers/ODS_DATA.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/faq/036/FAQ03611.html" target="_blank"&gt;http://support.sas.com/faq/036/FAQ03611.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/templateFAQ/Template.html" target="_blank"&gt;http://support.sas.com/rnd/base/topics/templateFAQ/Template.html&lt;/A&gt; (follow the links for ODS and the DATA Step)&lt;BR /&gt;
  &lt;BR /&gt;
Good luck! Here's a program that shows the basic syntax. &lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
title;&lt;BR /&gt;
footnote;&lt;BR /&gt;
ods noproctitle;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
               &lt;BR /&gt;
** make some test data;&lt;BR /&gt;
data work.sales; &lt;BR /&gt;
  set sashelp.shoes(rename=(sales=sales1));&lt;BR /&gt;
  where product contains 'Dress';&lt;BR /&gt;
  year1=2003;&lt;BR /&gt;
  sales2=sales1*1.05;&lt;BR /&gt;
  year2=year1+1;&lt;BR /&gt;
  sales3=sales2*1.05;&lt;BR /&gt;
  year3=year2+1;&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
proc means data=work.sales noprint nway;&lt;BR /&gt;
  class Region;&lt;BR /&gt;
  var sales1 sales2 sales3;&lt;BR /&gt;
  id year1 year2 year3;&lt;BR /&gt;
  output out=work.salessummary&lt;BR /&gt;
         sum=sum_sales1 sum_sales2 sum_sales3 &lt;BR /&gt;
         mean=mean_sales1 mean_sales2 mean_sales3;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
** this shows the "new" syntax for data _null_ and ODS;&lt;BR /&gt;
** there is more you can do, but this is the basics.;&lt;BR /&gt;
** With custom table templates added into the mix, ;&lt;BR /&gt;
** you can do more to create custom tabular reports;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods rtf file='c:\temp\only_year3.rtf';&lt;BR /&gt;
ods html file='c:\temp\only_year3.html';&lt;BR /&gt;
ods pdf file='c:\temp\only_year3.pdf';&lt;BR /&gt;
title 'Only Year 3 Dress Shoes Projected Sales';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set work.salessummary;&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(variables=(Region&lt;BR /&gt;
	               year3 sum_sales3 mean_sales3));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                     &lt;BR /&gt;
ods rtf file='c:\temp\year1_year3.rtf';&lt;BR /&gt;
ods html file='c:\temp\year1_year3.html';&lt;BR /&gt;
ods pdf file='c:\temp\year1_year3.pdf';&lt;BR /&gt;
title 'Compare Year 1 (Actual) and Year 3 (Projected)';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set work.salessummary;&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(variables=(Region&lt;BR /&gt;
                       year1 sum_sales1 mean_sales1&lt;BR /&gt;
	               year3 sum_sales3 mean_sales3));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
ods listing;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 09 Feb 2007 22:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/data-null-and-RTF/m-p/2279#M995</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-02-09T22:16:38Z</dc:date>
    </item>
  </channel>
</rss>

