<?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: IF...THEN... statement and logic expression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293191#M60951</link>
    <description>Thanks so much!</description>
    <pubDate>Mon, 22 Aug 2016 17:11:13 GMT</pubDate>
    <dc:creator>jj02148</dc:creator>
    <dc:date>2016-08-22T17:11:13Z</dc:date>
    <item>
      <title>IF...THEN... statement and logic expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293186#M60947</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran into a problem in which I need to write a long logic expression: &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;A01=1 OR A02=1 OR A03=1 OR A04=1 OR... A15=1 then TF=1;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if there is an easy and quick way to write the code? Say, &lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;IF any of (A01--A15) =1 then TF=1?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 16:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293186#M60947</guid>
      <dc:creator>jj02148</dc:creator>
      <dc:date>2016-08-22T16:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: IF...THEN... statement and logic expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293189#M60949</link>
      <description>&lt;P&gt;If you create an array holding the variables, there are two methods.&amp;nbsp; The array:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array alist {15} a01-a15;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you could search with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if whichn(1, of alist{*}) then TF=1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Surprisingly, this method also works (once the array is defined):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if 1 in alist then TF=1;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 17:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293189#M60949</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-22T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: IF...THEN... statement and logic expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293191#M60951</link>
      <description>Thanks so much!</description>
      <pubDate>Mon, 22 Aug 2016 17:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-THEN-statement-and-logic-expression/m-p/293191#M60951</guid>
      <dc:creator>jj02148</dc:creator>
      <dc:date>2016-08-22T17:11:13Z</dc:date>
    </item>
  </channel>
</rss>

