<?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 sum statement in SAS Certification</title>
    <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902743#M1664</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi everyone! Please I'm trying to figure out if the process of setting the accumulating variable in sum statement occurs at the compilation or execution phase. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The documentation reads, "the variable is automatically set to 0 before SAS reads the first observation. The variable's value is retained from one iteration to the next, as if it had appeared in a RETAIN statement." I think "before SAS reads the first observation" implies it occurred&amp;nbsp;before the data step execution, i.e. at the compilation stage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now in the case of group processing where &lt;SPAN&gt;the accumulating variable is set to zero at the start of each BY group, this appears to be at the execution stage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2023 05:58:46 GMT</pubDate>
    <dc:creator>PrinceAde</dc:creator>
    <dc:date>2023-11-13T05:58:46Z</dc:date>
    <item>
      <title>sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902743#M1664</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi everyone! Please I'm trying to figure out if the process of setting the accumulating variable in sum statement occurs at the compilation or execution phase. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The documentation reads, "the variable is automatically set to 0 before SAS reads the first observation. The variable's value is retained from one iteration to the next, as if it had appeared in a RETAIN statement." I think "before SAS reads the first observation" implies it occurred&amp;nbsp;before the data step execution, i.e. at the compilation stage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now in the case of group processing where &lt;SPAN&gt;the accumulating variable is set to zero at the start of each BY group, this appears to be at the execution stage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 05:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902743#M1664</guid>
      <dc:creator>PrinceAde</dc:creator>
      <dc:date>2023-11-13T05:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902745#M1665</link>
      <description>&lt;P&gt;I don't think this will make any practical difference.&lt;/P&gt;
&lt;P&gt;My two cents, compilation is the process to transform your text input to executable instructions.&lt;/P&gt;
&lt;P&gt;Setting&amp;nbsp; up variables, assignments and such, for me that is part of the execution.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 07:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902745#M1665</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-11-13T07:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902746#M1666</link>
      <description>&lt;P&gt;During compilation, the memory space for variables is set up, and usually initialized with missing values. Under certain circumstances, other values are used (0 through a SUM statement, or the initial values declared in a RETAIN).&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 07:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902746#M1666</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-11-13T07:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902749#M1667</link>
      <description>&lt;P&gt;I stand corrected:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/lrcon/9.4/p18vk5t9cwort1n18g7zg2no6tr4.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/lrcon/9.4/p18vk5t9cwort1n18g7zg2no6tr4.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 07:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902749#M1667</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-11-13T07:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902750#M1668</link>
      <description>All takes place during the compilation phase.  There is no such thing as automatic changing a retained variable for a BY statement.  You have to program that yourself, and it executes during the execution phase.</description>
      <pubDate>Mon, 13 Nov 2023 07:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902750#M1668</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-11-13T07:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902752#M1669</link>
      <description>&lt;P&gt;This is very helpful. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 08:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902752#M1669</guid>
      <dc:creator>PrinceAde</dc:creator>
      <dc:date>2023-11-13T08:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902753#M1670</link>
      <description>&lt;P&gt;Okay Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 08:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902753#M1670</guid>
      <dc:creator>PrinceAde</dc:creator>
      <dc:date>2023-11-13T08:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement</title>
      <link>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902754#M1671</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 08:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/sum-statement/m-p/902754#M1671</guid>
      <dc:creator>PrinceAde</dc:creator>
      <dc:date>2023-11-13T08:22:18Z</dc:date>
    </item>
  </channel>
</rss>

