<?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: Suming values between records in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128268#M26218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This statement does not belong in the code.&amp;nbsp; For every observation, you are setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CumulativeNumber=.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I still don't see my earlier suggestion incorporated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Mar 2013 16:17:26 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2013-03-07T16:17:26Z</dc:date>
    <item>
      <title>Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128263#M26213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a simple data step where I am trying to create a cumulative number column (CumulativeNumber) based on the value of another column (DistributiveNumber). This column resets to 0 each time a new section of County Year AgeRange ExitMonthCategory is reached. However as the attached example shows it is re-setting, but not summing correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see anything wrong with the below code, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=s9CountyAges;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test1;&lt;/P&gt;&lt;P&gt;set s9CountyAges;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if first.AgeRange then CumulativeNumber=0;&lt;/P&gt;&lt;P&gt;CumulativeNumber + DistributiveNumber;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 00:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128263#M26213</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-06T00:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128264#M26214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with Sum function because :smileyplus: operator will not give correct summing of the data if empty values are present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CumulativeNumber=sum(CumulativeNumber,DistributiveNumber);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sylas.J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 00:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128264#M26214</guid>
      <dc:creator>Sylas</dc:creator>
      <dc:date>2013-03-06T00:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128265#M26215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's close to working.&amp;nbsp; This switch should do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if first.&lt;STRONG&gt;ExitMonthCategory&lt;/STRONG&gt; then CumulativeNumber=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 03:42:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128265#M26215</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-03-06T03:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128266#M26216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*Identifying Duplicates by specified variables*/ &lt;/P&gt;&lt;P&gt;proc sort nodupkey data = have dupout = dup;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by country year agerange exitmonthCategory;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*Combine it with original data*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want(drop = distributivenumber1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dup(rename = (distributivenumber = distributivenumber1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by country year agerange exitmonthCategory;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if distributivenumber1 EQ . then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cum_num = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cum_num = sum(distributivenumber,distributivenumber1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Urvish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 09:46:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128266#M26216</guid>
      <dc:creator>UrvishShah</dc:creator>
      <dc:date>2013-03-06T09:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128267#M26217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried everyone's ideas above and it is still not summing at all. I have used this type of data step many times before and it has worked fine. I tried the below simplified variation of it and it is not working either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything unusual that the the sum function needs to operate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=s9CountyAges;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test1;&lt;/P&gt;&lt;P&gt;set s9CountyAges;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;CumulativeNumber=.;&lt;/P&gt;&lt;P&gt;if first.AgeRange then CumulativeNumber=0;&lt;/P&gt;&lt;P&gt;CumulativeNumber + DistributiveNumber;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128267#M26217</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-07T16:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128268#M26218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This statement does not belong in the code.&amp;nbsp; For every observation, you are setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CumulativeNumber=.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I still don't see my earlier suggestion incorporated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128268#M26218</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-03-07T16:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128269#M26219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it with 'ExitMonthCategory' and it did not work--it does not sum anything actually. When I have used this in the past, I always set the 'first' variable to the second to last one in the 'by' statement. This usually works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data short;&lt;/P&gt;&lt;P&gt;set short;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;if first.ExitMonthCategory then CumulativeNumber=0;&lt;/P&gt;&lt;P&gt;CumulativeNumber + DistributiveNumber;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128269#M26219</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-07T16:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128270#M26220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could be right about which variable is the "first" one.&amp;nbsp; It all depends on the level at which you would like to accumulate.&amp;nbsp; The original post said you wanted to set your CumulativeNumber to 0 each time you hit a new County / Year / AgeRange / ExitMonthCategory.&amp;nbsp; If you use first.AgeRange, you will set your CumulativeNumber to 0 each time&amp;nbsp; you hit a new County / Year / AgeRange.&amp;nbsp; It's not that one is right and the other is wrong, it just depends on what you would like your cumulative number to represent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's nothing wrong with the last set of code you posted.&amp;nbsp; Instead of posting a spreadsheet, run a PROC PRINT and examine the first 5 or 10 lines.&amp;nbsp; If it doesn't look right, post those lines along with the output from a PROC CONTENTS.&amp;nbsp; There aren't too many places for this sort of problem to hide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128270#M26220</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-03-07T16:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128271#M26221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Astounding&lt;/P&gt;&lt;P&gt;I re-ran it, it didn't sum anything. Below is the first 20 records which show that the CumulativeNumber column is just being set equal to the DistributiveNumber column and it is not zeroing out either. I don't know of a way to attach the proc contents though. I can't post it on a website right now due to temporary inaccess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anything jumps out, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=short;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data short;&lt;/P&gt;&lt;P&gt;set short;&lt;/P&gt;&lt;P&gt;by County Year AgeRange ExitMonthCategory;&lt;/P&gt;&lt;P&gt;if first.AgeRange then CumulativeNumber=0;&lt;/P&gt;&lt;P&gt;CumulativeNumber + DistributiveNumber;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Print:&lt;/P&gt;&lt;P&gt;Obs County Year AgeRange ExitMonthCategory DistributiveNumber CumulativeNumber&lt;/P&gt;&lt;P&gt;1 Albany 2006 1 - 0 to 3 3 0 0&lt;/P&gt;&lt;P&gt;2 Albany 2006 1 - 0 to 3 4 0 0&lt;/P&gt;&lt;P&gt;3 Albany 2006 1 - 0 to 3 5 0 0&lt;/P&gt;&lt;P&gt;4 Albany 2006 1 - 0 to 3 6 0 0&lt;/P&gt;&lt;P&gt;5 Albany 2006 1 - 0 to 3 12 6 6&lt;/P&gt;&lt;P&gt;6 Albany 2006 1 - 0 to 3 18 7 7&lt;/P&gt;&lt;P&gt;7 Albany 2006 1 - 0 to 3 24 5 5&lt;/P&gt;&lt;P&gt;8 Albany 2006 1 - 0 to 3 30 0 0&lt;/P&gt;&lt;P&gt;9 Albany 2006 1 - 0 to 3 36 1 1&lt;/P&gt;&lt;P&gt;10 Albany 2006 1 - 0 to 3 42 0 0&lt;/P&gt;&lt;P&gt;11 Albany 2006 1 - 0 to 3 48 0 0&lt;/P&gt;&lt;P&gt;12 Albany 2006 1 - 0 to 3 54 0 0&lt;/P&gt;&lt;P&gt;13 Albany 2006 1 - 0 to 3 60 0 0&lt;/P&gt;&lt;P&gt;14 Albany 2006 1 - 0 to 3 66 0 0&lt;/P&gt;&lt;P&gt;15 Albany 2006 1 - 0 to 3 72 0 0&lt;/P&gt;&lt;P&gt;16 Albany 2006 2 - 4 to 6 3 0 0&lt;/P&gt;&lt;P&gt;17 Albany 2006 2 - 4 to 6 4 0 0&lt;/P&gt;&lt;P&gt;18 Albany 2006 2 - 4 to 6 5 0 0&lt;/P&gt;&lt;P&gt;19 Albany 2006 2 - 4 to 6 6 0 0&lt;/P&gt;&lt;P&gt;20 Albany 2006 2 - 4 to 6 12 2 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 19:49:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128271#M26221</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-07T19:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128272#M26222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't this&lt;/P&gt;&lt;P&gt;data short;&lt;/P&gt;&lt;P&gt;set short;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set short;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128272#M26222</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-03-07T19:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128273#M26223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two questions.&lt;/P&gt;&lt;P&gt;1) Does the variable you trying to accumulate into already exist on the input dataset? If so this will cause trouble because each time it reads a record it will override the value you are trying to carry forward from the previous observation.&lt;/P&gt;&lt;P&gt;2) Does the variable AGERANGE really have the values listed in the output or does it in fact have multiple distinct values that are grouped for display with a user defined format?&amp;nbsp; This could cause the FIRST. to get trigger more often that it would appear from the displayed values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 20:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128273#M26223</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-07T20:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128274#M26224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, there still looks like there is nothing wrong with the program.&amp;nbsp; So let's examine the data.&amp;nbsp; Try adding these statements, and let's see what these new variables tell us:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F_County = first.county;&lt;/P&gt;&lt;P&gt;F_Year = first.year;&lt;/P&gt;&lt;P&gt;F_AgeRange = first.agerange;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that some values are different, even if they look the same when they print.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 20:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128274#M26224</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-03-07T20:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Suming values between records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128275#M26225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;Your question above on if the CumulativeNumber variable exists on the input data set was the problem. It did and once I created it at accumulation, it resolved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for ending a lot of frustration!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 00:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suming-values-between-records/m-p/128275#M26225</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-08T00:13:31Z</dc:date>
    </item>
  </channel>
</rss>

