<?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 Proc PRINT - counts and sums in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319765#M70325</link>
    <description>&lt;P&gt;proc sort data=Final&lt;BR /&gt;out=Final3;&lt;BR /&gt;by state;&lt;BR /&gt;proc print data=final3;&lt;BR /&gt;var id name date manner_of_death armed age gender race city state flee body_camera;&lt;BR /&gt;where state in ('MA', 'CT', 'NH', 'VT', 'ME', 'RI');&lt;/P&gt;
&lt;P&gt;sum&amp;nbsp;&lt;BR /&gt;by state;&lt;BR /&gt;pageby state;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I am trying to get count totals on the bottom of my tables for each page (attached) of the amount of records there. I do not want to sum any number...how do I do that??&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13268i05DC0E2E59A31721/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS.png" title="SAS.png" /&gt;</description>
    <pubDate>Sun, 18 Dec 2016 05:59:59 GMT</pubDate>
    <dc:creator>sconn</dc:creator>
    <dc:date>2016-12-18T05:59:59Z</dc:date>
    <item>
      <title>Proc PRINT - counts and sums</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319765#M70325</link>
      <description>&lt;P&gt;proc sort data=Final&lt;BR /&gt;out=Final3;&lt;BR /&gt;by state;&lt;BR /&gt;proc print data=final3;&lt;BR /&gt;var id name date manner_of_death armed age gender race city state flee body_camera;&lt;BR /&gt;where state in ('MA', 'CT', 'NH', 'VT', 'ME', 'RI');&lt;/P&gt;
&lt;P&gt;sum&amp;nbsp;&lt;BR /&gt;by state;&lt;BR /&gt;pageby state;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I am trying to get count totals on the bottom of my tables for each page (attached) of the amount of records there. I do not want to sum any number...how do I do that??&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13268i05DC0E2E59A31721/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS.png" title="SAS.png" /&gt;</description>
      <pubDate>Sun, 18 Dec 2016 05:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319765#M70325</guid>
      <dc:creator>sconn</dc:creator>
      <dc:date>2016-12-18T05:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Summary (Counts and Sums)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319766#M70326</link>
      <description>Hi:&lt;BR /&gt;  I'm not exactly sure what you want, but you can try the N option on your PROC PRINT statement:&lt;BR /&gt;proc print data=final3 n;&lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Sun, 18 Dec 2016 02:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319766#M70326</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-12-18T02:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Summary (Counts and Sums)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319767#M70327</link>
      <description>&lt;P&gt;I was looking for a summary for a total number on each state. If you look at my attachment where the n= is I want an area saying 'Total Number of' with the count of records for that page.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13269i36F8F7F340956257/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS.png" title="SAS.png" /&gt;</description>
      <pubDate>Sun, 18 Dec 2016 02:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319767#M70327</guid>
      <dc:creator>sconn</dc:creator>
      <dc:date>2016-12-18T02:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Summary (Counts and Sums)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319784#M70336</link>
      <description>&lt;P&gt;SUMLABEL on the PROC PRINT statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation has an example of this implementation for PROC PRINT.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/69850/HTML/default/viewer.htm#p0f022tve3mt0tn162itrb0tkjgi.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/69850/HTML/default/viewer.htm#p0f022tve3mt0tn162itrb0tkjgi.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC PRINT has SUM or SUMBY statements, &amp;nbsp;but you seem to have SUM BY(space). Check the log to see if SAS is correcting this for you, but it's good to be explicit in your syntax.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 05:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319784#M70336</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-18T05:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Summary (Counts and Sums)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319785#M70337</link>
      <description>&lt;P&gt;And if you don't have a record you want to SUM add a dummy variable that has a value of 1 to each record and use that but don't display it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that would work, but haven't tested it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 05:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319785#M70337</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-18T05:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Summary (Counts and Sums)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319813#M70351</link>
      <description>Dummy variable would not work for PROC PRINT, but would work with PROC REPORT.&lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Sun, 18 Dec 2016 19:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-PRINT-counts-and-sums/m-p/319813#M70351</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-12-18T19:28:17Z</dc:date>
    </item>
  </channel>
</rss>

