<?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: Variable Created using SUM statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153794#M30173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I too believe , the correct answer is (A) as it will take a initial value of 0 during the execution time and then adds 1 . The below code should helps us understand what is happening before the sum statement and after the sum statement from the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the sum statement it has a value of 0 and after sum statement it takes the values of 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&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;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Mar 2014 15:41:10 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2014-03-23T15:41:10Z</dc:date>
    <item>
      <title>Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153793#M30172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When a variable is created using SUM statement, it will be assigned to what value and when? Either it will be assigned a value 0 when data step begin execution or assigned a value 0 at compile time.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.NEW;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.OLD;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count+1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable Count is created using a sum statement. Which statement regarding this variable is true?&lt;/P&gt;&lt;P&gt;A. It is assigned a value 0 when the data step begins execution.&lt;/P&gt;&lt;P&gt;B. It is assigned a value of missing when the data step begins execution.&lt;/P&gt;&lt;P&gt;C. It is assigned a value 0 at compile time.&lt;/P&gt;&lt;P&gt;D. It is assigned a value of missing at compile time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct answer to this question with explanation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to me, it should be answer (A) - It is assigned a value 0 when the data step begins execution but need to double check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 09:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153793#M30172</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-03-23T09:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153794#M30173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I too believe , the correct answer is (A) as it will take a initial value of 0 during the execution time and then adds 1 . The below code should helps us understand what is happening before the sum statement and after the sum statement from the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the sum statement it has a value of 0 and after sum statement it takes the values of 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&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;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 15:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153794#M30173</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2014-03-23T15:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153795#M30174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not being a programmer, per se, some of the distinctions between whether something happens at the compilation vs the execution phase are often irrelevant to me .. as long as I know the order that statements will be processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, I have read that the retain statement is acted on during the compilation phase.&amp;nbsp; If that is correct, then I would choose option C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code illustrates, I think, that the implied retain in a sum statement is what causes the value to be initially set at 0:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format count1 count2 count3 best12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain count2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain count3 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count1+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count2=count2+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count3=count3+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 16:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153795#M30174</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-23T16:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153796#M30175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be (A). Variable count in your code will get the default initial value of 0 just before the data step read the first observation.&lt;/P&gt;&lt;P&gt;Where as a RETAIN statement is only a compile time statement and is used to initialize a sum variable with a value other than 0.&lt;/P&gt;&lt;P&gt;In addition to that, if you don't supply any value to the variable in RETAIN&amp;nbsp; statement, then it just act as if it was simply just another sum variable, means its &lt;SPAN style="text-decoration: underline;"&gt;initialized to 0&lt;/SPAN&gt; like in the first case.&lt;/P&gt;&lt;P&gt;In any case, the initial value, whether it is 0 or other, is assigned at the starting of execution. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: The default initialization value for&amp;nbsp; RETAIN variable if not given explicitly, is a missing value. Not 0. I posted it above to be 0 since I read it from SAS base prep guide which is wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 19:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153796#M30175</guid>
      <dc:creator>JVarghese</dc:creator>
      <dc:date>2014-03-23T19:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153797#M30176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I disagree!&amp;nbsp; Take a look at: &lt;A href="http://www.lexjansen.com/pharmasug/2005/handsonworkshops/hw06.pdf" title="http://www.lexjansen.com/pharmasug/2005/handsonworkshops/hw06.pdf"&gt;http://www.lexjansen.com/pharmasug/2005/handsonworkshops/hw06.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 20:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153797#M30176</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-23T20:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153798#M30177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur;&lt;/P&gt;&lt;P&gt;The following is just a relevant portion from the pdf which you gave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a distinct compile action and execution for each DATA and PROC step in a SAS program. Each step is &lt;/P&gt;&lt;P&gt;compiled, then executed, independently and sequentially. Understanding the defaults of each activity in DATA step &lt;/P&gt;&lt;P&gt;processing is critical to achieving accurate results. During the compilation of a DATA step, the following actions &lt;/P&gt;&lt;P&gt;(among others) occur: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;syntax scan &lt;/LI&gt;&lt;LI&gt;SAS source code translation to machine language &lt;/LI&gt;&lt;LI&gt;definition of input and output files &lt;/LI&gt;&lt;LI&gt; creation of tools: &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input buffer (if reading any non-SAS data), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Logical Program Data Vector (LPDV), &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and data set descriptor information &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;determining variable attributes for output SAS data set &lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;capturing variables to be initialized to missing&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think compilation is only about internal machine language instructions as to what is or how it is to be done during the execution. In SAS an LPDV is also created just like another buffer where temporary results of processing is stored before taking to the output data set. There must be some instruction that the accumulator&amp;nbsp; variable need to be assigned to 0, I mean actual assignment takes place during the very beginning of execution. Otherwise the system would be wasting memory resources I guess. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RETAIN statement is compile time only means it is just for the sake of telling SAS explicitly that the variable need not be reinitialized to missing through every&amp;nbsp; iterations and is not encountered during execution a second time. Just like &amp;lt;#include&amp;gt; pre-processor in C language. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my understanding and please don't bother if I am incorrect and help me giving more of your valuable knowledge. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jojan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 22:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153798#M30177</guid>
      <dc:creator>JVarghese</dc:creator>
      <dc:date>2014-03-23T22:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153799#M30178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jojan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You missed my point.&amp;nbsp; According to Neil's paper, the first put _all_ statement, before an input statement, reflects what has occurred during the compilation phase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the following code and then look at the log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format count1 count2 count3 best12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain count2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain count3 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile cards dlm='09'x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (name sex) ($) age height weight;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count1+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count2=count2+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count3=count3+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Joyce F 11 51.3 50.5&lt;/P&gt;&lt;P&gt;Thomas M 11 57.5 85&lt;/P&gt;&lt;P&gt;James M 12 57.3 83&lt;/P&gt;&lt;P&gt;Jane F 12 59.8 84.5&lt;/P&gt;&lt;P&gt;John M 12 59 99.5&lt;/P&gt;&lt;P&gt;Louise F 12 56.3 77&lt;/P&gt;&lt;P&gt;Robert M 12 64.8 128&lt;/P&gt;&lt;P&gt;Alice F 13 56.5 84&lt;/P&gt;&lt;P&gt;Barbara F 13 65.3 98&lt;/P&gt;&lt;P&gt;Jeffrey M 13 62.5 84&lt;/P&gt;&lt;P&gt;Alfred M 14 69 112.5&lt;/P&gt;&lt;P&gt;Carol F 14 62.8 102.5&lt;/P&gt;&lt;P&gt;Henry M 14 63.5 102.5&lt;/P&gt;&lt;P&gt;Judy F 14 64.3 90&lt;/P&gt;&lt;P&gt;Janet F 15 62.5 112.5&lt;/P&gt;&lt;P&gt;Mary F 15 66.5 112&lt;/P&gt;&lt;P&gt;Ronald M 15 67 133&lt;/P&gt;&lt;P&gt;William M 15 66.5 112&lt;/P&gt;&lt;P&gt;Philip M 16 72 150&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll notice that the first values of count1 and count3 shown in the log are 0.&amp;nbsp; Thus, if&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Neil's paper is correct, that occurred during the compilation phase.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 22:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153799#M30178</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-23T22:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153800#M30179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First values of count1 and count3 are definitely 0, that's true. But the assignment to zero happens only at the beginning of execution.&lt;/P&gt;&lt;P&gt;If you go through the LPDV diagram in Neil's paper, you can see that during compilation, just a structure of LPDV is created with type and other attributes of each variable.&lt;/P&gt;&lt;P&gt;The initial values and even the missing values are assigned only at the beginning of execution. RETAIN statement or an accumulator variable from a sum statement gives information to the LPDV as to what should be done with these variables at the beginning and throughout the data step iterations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jojan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 18:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153800#M30179</guid>
      <dc:creator>JVarghese</dc:creator>
      <dc:date>2014-03-24T18:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153801#M30180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jojan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'll simply have to agree to disagree.&amp;nbsp; However, on an exam, I think my answer is right and your's would be marked wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe, someone from SAS who is familiar with what is actually going on in the two phases, will volunteer to be a referee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 19:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153801#M30180</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-24T19:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153802#M30181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the answer's D, but again, not great at compile/execution differentiation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Retain is a compile time statement.&lt;/P&gt;&lt;P&gt;However, If you omit &lt;SPAN class="emph"&gt;initial-value&lt;/SPAN&gt;, the initial value is missing (docs)&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214163.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214163.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you have a variable count in your dataset it may be different as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data nothing;&lt;/P&gt;&lt;P&gt;retain count;&lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data nothing;&lt;/P&gt;&lt;P&gt;retain count;&lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;count+1;&lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 19:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153802#M30181</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-24T19:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153803#M30182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats fine.&amp;nbsp; Thank you Arthur.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 20:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153803#M30182</guid>
      <dc:creator>JVarghese</dc:creator>
      <dc:date>2014-03-24T20:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153804#M30183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While I still think we should wait for someone who really KNOWS, I have to respond to Farezza's post and, in the process, provide some more support for why I responded as I initially did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, a retain statement, without an initial value, will set the value to missing in the pdv at the compilation phase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, a sum statement will set the value to 0 in the pdv at the compilation phase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought Neil's paper did a nice job explaining it, but here are two more definitive overviews that methinks agrees with my position:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000961108.htm" title="https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000961108.htm"&gt;SAS(R) 9.2 Language Reference: Concepts, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/The_SAS_Supervisor" title="http://www.sascommunity.org/wiki/The_SAS_Supervisor"&gt;The SAS Supervisor - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless, I think that you will find both to be excellent reads.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 20:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153804#M30183</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-24T20:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153805#M30184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it just sum or any other implicit retain statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 21:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153805#M30184</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-24T21:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153806#M30185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends upon what you are asking.&amp;nbsp; Set , merge and temporary arrays all implicitly retain variables, but a sum statement causes an implicit retain with an initial value of 0.&amp;nbsp; There may be others that I'm not aware of that have the same effect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 22:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153806#M30185</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-03-24T22:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153807#M30186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Arthur for a detailed explanation about this question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Apr 2014 17:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153807#M30186</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-05T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153808#M30187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for your valuable comments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion:&lt;/P&gt;&lt;P&gt;The variable created using SUM statement is initialized with 0 during compilation phase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Apr 2014 17:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/153808#M30187</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-05T17:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Created using SUM statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/262994#M51458</link>
      <description>&lt;P&gt;Since count1 + 1 is a &amp;nbsp;sum statement it can be read as ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;retain count1 0 ;&lt;/P&gt;&lt;P&gt;count1 = count1 + 1;&lt;/P&gt;&lt;P&gt;since retain statement get its 0 value during compilation time I think &amp;nbsp;answer is C.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C. It is assigned a value 0 at compile time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 19:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Created-using-SUM-statement/m-p/262994#M51458</guid>
      <dc:creator>somynt</dc:creator>
      <dc:date>2016-04-11T19:00:52Z</dc:date>
    </item>
  </channel>
</rss>

