<?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: retain in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176992#M264757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data together (drop=diff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set jun2014 jul2014;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; diff=plan-lag(plan);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not first.id then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if diff eq 0 then change = 'none';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if diff gt 0 then change = 'up';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else change = 'down';&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jul 2014 01:11:11 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2014-07-12T01:11:11Z</dc:date>
    <item>
      <title>retain</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176991#M264756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attaching some example code.&amp;nbsp; I want to find if there was an upsell or downsell over two time periods.&amp;nbsp; I tried to use a retain statement with by id plan, thinking that it wouldn't retain across id's, that is not the case.&amp;nbsp; Is retain the right solution for this problem and I have written incorrectly or am I going about this the wrong way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jul 2014 00:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176991#M264756</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-07-12T00:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: retain</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176992#M264757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data together (drop=diff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set jun2014 jul2014;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; diff=plan-lag(plan);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not first.id then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if diff eq 0 then change = 'none';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if diff gt 0 then change = 'up';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else change = 'down';&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jul 2014 01:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176992#M264757</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-07-12T01:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: retain</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176993#M264758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent, thank you.&amp;nbsp; I looked up a pdf showing retain vs lag but couldn't get what I wanted out of it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jul 2014 01:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retain/m-p/176993#M264758</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-07-12T01:45:27Z</dc:date>
    </item>
  </channel>
</rss>

