<?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 if then else in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529729#M144783</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write a logic and have been getting an error. "statement is not valid or it is used out of proper order"&lt;/P&gt;&lt;P&gt;Could you help me figure out the mistake in these statements&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;IF (PalS_N/19 &amp;gt; .50) THEN&lt;BR /&gt;PalS = SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14)*19/(PalS_N);&lt;BR /&gt;ELSE IF (PalS_N/19 &amp;lt; .50) THEN PalS =SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14);&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 16:14:53 GMT</pubDate>
    <dc:creator>robertrao</dc:creator>
    <dc:date>2019-01-24T16:14:53Z</dc:date>
    <item>
      <title>if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529729#M144783</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to write a logic and have been getting an error. "statement is not valid or it is used out of proper order"&lt;/P&gt;&lt;P&gt;Could you help me figure out the mistake in these statements&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;IF (PalS_N/19 &amp;gt; .50) THEN&lt;BR /&gt;PalS = SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14)*19/(PalS_N);&lt;BR /&gt;ELSE IF (PalS_N/19 &amp;lt; .50) THEN PalS =SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14);&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529729#M144783</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2019-01-24T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529732#M144785</link>
      <description>&lt;P&gt;Show your log. And what happens if it equals 0.5?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31685"&gt;@robertrao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to write a logic and have been getting an error. "statement is not valid or it is used out of proper order"&lt;/P&gt;
&lt;P&gt;Could you help me figure out the mistake in these statements&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;IF (PalS_N/19 &amp;gt; .50) THEN&lt;BR /&gt;PalS = SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14)*19/(PalS_N);&lt;BR /&gt;ELSE IF (PalS_N/19 &amp;lt; .50) THEN PalS =SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14);&lt;/P&gt;
&lt;P&gt;run;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529732#M144785</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T16:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529738#M144790</link>
      <description>&lt;P&gt;Thanks Reeza for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it equals 0.5 then it is to be included in the less than or equal to category &lt;STRONG&gt;(PalS_N/19 &amp;lt;= .50).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The following is the error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529738#M144790</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2019-01-24T16:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529747#M144793</link>
      <description>Please post the full log. Where the error occurs tells you where the error is.</description>
      <pubDate>Thu, 24 Jan 2019 16:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529747#M144793</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T16:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529749#M144795</link>
      <description>&lt;P&gt;Thanks Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It finally worked. I had some RUN statements in between the statements and forgot to remove them !!!!&lt;/P&gt;&lt;P&gt;This statement worked!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF (PalS_N/19 &amp;gt; .50) THEN&lt;BR /&gt;PalS = SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14)*19/(PalS_N);&lt;BR /&gt;ELSE PalS =SUM(PAL1,PAL2,PAL3,PAL4, B1, PAL5, C2, O2, PAL6, PAL7, Br7, PAL8, PAL9,PAL10, Sp21, PAL12, L1, PAL13, PAL14);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529749#M144795</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2019-01-24T16:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: if then else</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529793#M144812</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31685"&gt;@robertrao&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you regard your discovery of the problem diagnosis and fix as a demonstration of the wisdom of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; 's request for the full log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 18:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then-else/m-p/529793#M144812</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-01-24T18:23:52Z</dc:date>
    </item>
  </channel>
</rss>

