<?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: conditional statements in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/conditional-statements/m-p/393741#M94846</link>
    <description>&lt;P&gt;Yes, because the only way to enter the second condition is if it's not first.ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2017 00:24:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-09-07T00:24:41Z</dc:date>
    <item>
      <title>conditional statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conditional-statements/m-p/393738#M94844</link>
      <description>&lt;P&gt;&amp;nbsp;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are below two DATA step (test1, test2) same ? I am assuming the NOT FIRST.ID&amp;nbsp; is implied in test2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;data test;&lt;BR /&gt; input id x;&lt;BR /&gt; cards;&lt;BR /&gt; 1 2&lt;BR /&gt; 1 2&lt;BR /&gt; 2 3&lt;BR /&gt; 2 2&lt;BR /&gt; ;&lt;BR /&gt; run;&lt;BR /&gt;&lt;BR /&gt;data test1;&lt;BR /&gt; set test;&lt;BR /&gt; by id;&lt;BR /&gt; retain val;&lt;BR /&gt; if first.id then val = 1;&lt;BR /&gt; else if not first.id and x &amp;gt; 1 then val = 5;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data test2;&lt;BR /&gt; set test;&lt;BR /&gt; by id;&lt;BR /&gt; retain val;&lt;BR /&gt; if first.id then val = 1;&lt;BR /&gt; else if x &amp;gt; 1 then val = 5;&lt;BR /&gt;run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Sep 2017 00:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conditional-statements/m-p/393738#M94844</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2017-09-07T00:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: conditional statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conditional-statements/m-p/393741#M94846</link>
      <description>&lt;P&gt;Yes, because the only way to enter the second condition is if it's not first.ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 00:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conditional-statements/m-p/393741#M94846</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-07T00:24:41Z</dc:date>
    </item>
  </channel>
</rss>

