<?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: Summing a column in a very large dataset. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156150#M40961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Several ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select sum(Transaction_Amount) from want;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=want sum print;&lt;/P&gt;&lt;P&gt;var Transaction_Amount;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set want end=atlast;&lt;/P&gt;&lt;P&gt;retain sum_ta 0;&lt;/P&gt;&lt;P&gt;sum_ta + Transaction_Amount;&lt;/P&gt;&lt;P&gt;if atlast then put sum_ta=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last one shows the sum in the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc print will output all the data lines, which will be too much for, say, Enterprise Guide to display. And takes so long because it transfers all the data across the network.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jun 2014 08:11:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-06-26T08:11:08Z</dc:date>
    <item>
      <title>Summing a column in a very large dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156149#M40960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset that contains about 20 variables and roughly a million observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the variables is Transaction_Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I want to do is create a total value for that variable, I have tried to use proc print however the procedures takes ages and completely halts my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please advise me of a really simple and not resource heavy way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stret&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 07:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156149#M40960</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2014-06-26T07:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Summing a column in a very large dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156150#M40961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Several ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select sum(Transaction_Amount) from want;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=want sum print;&lt;/P&gt;&lt;P&gt;var Transaction_Amount;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set want end=atlast;&lt;/P&gt;&lt;P&gt;retain sum_ta 0;&lt;/P&gt;&lt;P&gt;sum_ta + Transaction_Amount;&lt;/P&gt;&lt;P&gt;if atlast then put sum_ta=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last one shows the sum in the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc print will output all the data lines, which will be too much for, say, Enterprise Guide to display. And takes so long because it transfers all the data across the network.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 08:11:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156150#M40961</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-26T08:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Summing a column in a very large dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156151#M40962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for this:smileycool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stret&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 08:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summing-a-column-in-a-very-large-dataset/m-p/156151#M40962</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2014-06-26T08:45:06Z</dc:date>
    </item>
  </channel>
</rss>

