<?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: Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767059#M243129</link>
    <description>&lt;P&gt;Right, got it sorry my bad!&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 15:40:35 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2021-09-10T15:40:35Z</dc:date>
    <item>
      <title>Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767048#M243125</link>
      <description>&lt;P&gt;Is the below an Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data _null_;
  retain k;
  b=.;
  k+b;
  put k=;
run;


data _null_;
/*  retain k;*/
  b=.;
  k+b;
  put k=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can somebody explain and help me why the difference in the results of K in the above 2 programs plz? Thank you in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOG-&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
70
71   data _null_;
72     retain k;
73     b=.;
74     k+b;
75     put k=;
76   run;

k=.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


77
78
79   data _null_;
80   /*  retain k;*/
81     b=.;
82     k+b;
83     put k=;
84   run;

k=0
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 14:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767048#M243125</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-09-10T14:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767058#M243128</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is the below an Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data _null_;
  retain k;
  b=.;
  k+b;
  put k=;
run;


data _null_;
/*  retain k;*/
  b=.;
  k+b;
  put k=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can somebody explain and help me why the difference in the results of K in the above 2 programs plz? Thank you in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOG-&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
70
71   data _null_;
72     retain k;
73     b=.;
74     k+b;
75     put k=;
76   run;

k=.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


77
78
79   data _null_;
80   /*  retain k;*/
81     b=.;
82     k+b;
83     put k=;
84   run;

k=0
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In your first data step you RETAIN K and implicitly initialize to missing.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-09-10 102646.png" style="width: 907px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63493i2EFC4EA9F36C739A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-09-10 102646.png" alt="Screenshot 2021-09-10 102646.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 15:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767058#M243128</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2021-09-10T15:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767059#M243129</link>
      <description>&lt;P&gt;Right, got it sorry my bad!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 15:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767059#M243129</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-09-10T15:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue or my lack of understanding: Sum statement with RETAIN vs NO RETAIN handling missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767202#M243200</link>
      <description>Sum statement include another implicated statement (i.e.   retain k 0 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Sat, 11 Sep 2021 12:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-or-my-lack-of-understanding-Sum-statement-with-RETAIN-vs/m-p/767202#M243200</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-11T12:15:26Z</dc:date>
    </item>
  </channel>
</rss>

