<?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: Kindly help me to resolve this error (IF-THEN statement) in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919100#M1463</link>
    <description>&lt;P&gt;The DATA step language provides a way to combine the comparisons, logically equivalent to BETWEEN&amp;nbsp; in SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if 100000 &amp;lt;= sales &amp;lt;= 200000&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Mar 2024 13:17:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-03-06T13:17:43Z</dc:date>
    <item>
      <title>Kindly help me to resolve this error (IF-THEN statement)</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919090#M1460</link>
      <description>&lt;P&gt;According to the question I have write the data set but it is not working for me.&amp;nbsp; I am not able to identify the problem so request you to please correct the error.&lt;/P&gt;&lt;P&gt;I am attaching 1. Question 2. written program 3. log section below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriyaB_0-1709727763208.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94414iE68BCC2A39BB3EFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriyaB_0-1709727763208.png" alt="PriyaB_0-1709727763208.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriyaB_1-1709727870309.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94415i2220A188F85528B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriyaB_1-1709727870309.png" alt="PriyaB_1-1709727870309.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PriyaB_2-1709728006446.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94416i5275B6540C2AFDB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PriyaB_2-1709728006446.png" alt="PriyaB_2-1709728006446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 12:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919090#M1460</guid>
      <dc:creator>PriyaB</dc:creator>
      <dc:date>2024-03-06T12:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Kindly help me to resolve this error (IF-THEN statement)</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919094#M1461</link>
      <description>&lt;P&gt;The AND operator compares the results of two complete logical expressions:&lt;/P&gt;
&lt;P&gt;IF &lt;EM&gt;logical expression 1&amp;nbsp; is true &lt;/EM&gt;AND&amp;nbsp;&lt;EM&gt;logical expression 2 is true&amp;nbsp;&lt;/EM&gt;THEN DO &lt;EM&gt;something&lt;/EM&gt;;&lt;/P&gt;
&lt;P&gt;In your code, expression 1 (sales&amp;gt;=100000) is OK, but expression 2 (&amp;gt;=200000) is incomplete, hence the error:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if sales&amp;gt;=100000 AND &amp;lt;=200000&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You need to specify&amp;nbsp;&lt;EM&gt;what value&amp;nbsp;&lt;/EM&gt;should be checked to see if it is less than 200000. Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if sales&amp;gt;=100000 AND sales &amp;lt;=200000&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That should work better.&lt;/P&gt;
&lt;P&gt;May the SAS be with you!&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 12:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919094#M1461</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2024-03-06T12:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kindly help me to resolve this error (IF-THEN statement)</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919100#M1463</link>
      <description>&lt;P&gt;The DATA step language provides a way to combine the comparisons, logically equivalent to BETWEEN&amp;nbsp; in SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if 100000 &amp;lt;= sales &amp;lt;= 200000&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2024 13:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919100#M1463</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-03-06T13:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Kindly help me to resolve this error (IF-THEN statement)</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919108#M1464</link>
      <description>&lt;P&gt;Thank you so much it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Priya&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 13:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Kindly-help-me-to-resolve-this-error-IF-THEN-statement/m-p/919108#M1464</guid>
      <dc:creator>PriyaB</dc:creator>
      <dc:date>2024-03-06T13:46:22Z</dc:date>
    </item>
  </channel>
</rss>

