<?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: using Proc Report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486352#M21458</link>
    <description>Should I summarize the data in the Data step and then TRANSPOSE. BY doing something like this -&lt;BR /&gt;&lt;BR /&gt;Data Sad;&lt;BR /&gt;Set UNIVERSI.univ2016_17;&lt;BR /&gt;if TERM_DESC= "Fall 2016" then NEWVAR = SUM(work);&lt;BR /&gt;else if TERM_DESC="Fall 2017" then NVAR = SUM(work);&lt;BR /&gt;Run;</description>
    <pubDate>Mon, 13 Aug 2018 14:12:00 GMT</pubDate>
    <dc:creator>75063</dc:creator>
    <dc:date>2018-08-13T14:12:00Z</dc:date>
    <item>
      <title>using Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486264#M21453</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to summarize the data (sample data attached) in the attached sample template with proc report. However I am getting error message&amp;nbsp; after I write this code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=sample&lt;/P&gt;&lt;P&gt;out=lat nowd;&lt;/P&gt;&lt;P&gt;column FT TERM_DESC work &amp;nbsp;let2015 ;&lt;/P&gt;&lt;P&gt;define FT/group;&lt;/P&gt;&lt;P&gt;define TERM_DESC/ ACROSS ;&lt;/P&gt;&lt;P&gt;compute let2015;&lt;/P&gt;&lt;P&gt;if TERM_DESC = "Fall 2016" THEN let2015 = work.sum ;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message states -&amp;nbsp;&lt;SPAN&gt;Variable TERM_DESC is uninitialized.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will appreciate some guidance in moving ahead and any tips to overcome any future hurdles in the report.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 06:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486264#M21453</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-13T06:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: using Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486276#M21455</link>
      <description>&lt;P&gt;Per the topic here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/template/m-p/486193/highlight/false#M126458" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/template/m-p/486193/highlight/false#M126458&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a datastep and transposes before proc report to manipulate your data, then use a simple proc report to output the data.&amp;nbsp; This is far simpler and more effective method than using a reporting procedure to manipulate data.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 08:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486276#M21455</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-13T08:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: using Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486352#M21458</link>
      <description>Should I summarize the data in the Data step and then TRANSPOSE. BY doing something like this -&lt;BR /&gt;&lt;BR /&gt;Data Sad;&lt;BR /&gt;Set UNIVERSI.univ2016_17;&lt;BR /&gt;if TERM_DESC= "Fall 2016" then NEWVAR = SUM(work);&lt;BR /&gt;else if TERM_DESC="Fall 2017" then NVAR = SUM(work);&lt;BR /&gt;Run;</description>
      <pubDate>Mon, 13 Aug 2018 14:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486352#M21458</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-13T14:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: using Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486353#M21459</link>
      <description>&lt;P&gt;Without seeing your data I have no idea.&amp;nbsp; You are effectively doing that in the proc report though, so just a matter of doing it in a datastep.&amp;nbsp; sum() function does not work the way you think, it works horizontally, so sum(work) will be the same as work, same number of observations.&amp;nbsp; You would need to retain it across rows:&lt;/P&gt;
&lt;PRE&gt;data sad;
  set...;
  retain newvar nvar;
  if...;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486353#M21459</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-13T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: using Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486357#M21460</link>
      <description>&lt;P&gt;Thank you for your reply. I have attached the Dataset and the reporting template here. Can you please advice the most efficient way to go about this.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-Proc-Report/m-p/486357#M21460</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-13T14:31:08Z</dc:date>
    </item>
  </channel>
</rss>

