<?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 Hidden Retain statement that is working without writing it in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hidden-Retain-statement-that-is-working-without-writing-it/m-p/672422#M202098</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Here are some examples to create serial number.&lt;/P&gt;
&lt;P&gt;Some of them are working and some not .&lt;/P&gt;
&lt;P&gt;I want to refresh my memory why Example1 is working without Retain statement?&lt;/P&gt;
&lt;P&gt;Does it mean that there is hidden Retain that is working here even if we didn't write Retain statement?&lt;/P&gt;
&lt;P&gt;Will it also work automatically when using&amp;nbsp;&lt;CODE class=" language-sas"&gt;sum(seq,1)&amp;nbsp;or&amp;nbsp;just&amp;nbsp;when&amp;nbsp;using&amp;nbsp;seq+1&amp;nbsp;?&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
Input profit;
cards;
10
40 
50
;
run;

Data ex1:
set have;
seq+1;
Run;

Data ex2:
set have;
sum(seq,1);
Run;


Data ex3:
set have;
Retain seq 0;
seq+1;
Run;


Data ex4:
set have;
Retain seq 0;
seq=seq+1;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 26 Jul 2020 23:18:20 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2020-07-26T23:18:20Z</dc:date>
    <item>
      <title>Hidden Retain statement that is working without writing it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hidden-Retain-statement-that-is-working-without-writing-it/m-p/672422#M202098</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Here are some examples to create serial number.&lt;/P&gt;
&lt;P&gt;Some of them are working and some not .&lt;/P&gt;
&lt;P&gt;I want to refresh my memory why Example1 is working without Retain statement?&lt;/P&gt;
&lt;P&gt;Does it mean that there is hidden Retain that is working here even if we didn't write Retain statement?&lt;/P&gt;
&lt;P&gt;Will it also work automatically when using&amp;nbsp;&lt;CODE class=" language-sas"&gt;sum(seq,1)&amp;nbsp;or&amp;nbsp;just&amp;nbsp;when&amp;nbsp;using&amp;nbsp;seq+1&amp;nbsp;?&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
Input profit;
cards;
10
40 
50
;
run;

Data ex1:
set have;
seq+1;
Run;

Data ex2:
set have;
sum(seq,1);
Run;


Data ex3:
set have;
Retain seq 0;
seq+1;
Run;


Data ex4:
set have;
Retain seq 0;
seq=seq+1;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Jul 2020 23:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hidden-Retain-statement-that-is-working-without-writing-it/m-p/672422#M202098</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-07-26T23:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hidden Retain statement that is working without writing it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hidden-Retain-statement-that-is-working-without-writing-it/m-p/672423#M202099</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;seq+1;&lt;/FONT&gt; has an implied RETAIN.&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1dfiqj146yi2cn1maeju9wo7ijs.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1dfiqj146yi2cn1maeju9wo7ijs.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Will it work for&amp;nbsp; your other examples? Run the code and see!&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Jul 2020 11:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hidden-Retain-statement-that-is-working-without-writing-it/m-p/672423#M202099</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-27T11:37:06Z</dc:date>
    </item>
  </channel>
</rss>

