<?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: range in if statment in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671100#M23361</link>
    <description>&lt;P&gt;I usually recommend drawing this out on a number line. So draw a line and then show your condition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ensure that all values for variable&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;are between 40 and 200, inclusively.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Between 40 and 200, inclusively &lt;STRONG&gt;means the end points are included in the interval&lt;/STRONG&gt;. So if you're 39.99 you're outside the interval but if you're 40 you're in the interval.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IF  KG_variable &amp;gt;= 40 AND KG_variable &amp;lt;=200 then do;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;This is an AND condition, not an OR condition.&amp;nbsp;&lt;/SPAN&gt;&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/319930"&gt;@veda8&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Ensure that all values for variable&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;are between 40 and 200, inclusively.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;what does the word inclusive mean here&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;should it be this option 1) ,if so why?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if Kilograms ge 40 or Kilograms le 200 then do;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;is this correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or should i write kilograms &amp;gt; 40 or kilograms =40 or kilograms =200 or kilograms &amp;lt; 200 them do;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jul 2020 16:25:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-21T16:25:00Z</dc:date>
    <item>
      <title>range in if statment</title>
      <link>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671091#M23358</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Ensure that all values for variable&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;are between 40 and 200, inclusively.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;what does the word inclusive mean here&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;should it be this option 1) ,if so why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if Kilograms ge 40 or Kilograms le 200 then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;is this correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or should i write kilograms &amp;gt; 40 or kilograms =40 or kilograms =200 or kilograms &amp;lt; 200 them do;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 16:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671091#M23358</guid>
      <dc:creator>veda8</dc:creator>
      <dc:date>2020-07-21T16:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: range in if statment</title>
      <link>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671100#M23361</link>
      <description>&lt;P&gt;I usually recommend drawing this out on a number line. So draw a line and then show your condition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ensure that all values for variable&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;are between 40 and 200, inclusively.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Between 40 and 200, inclusively &lt;STRONG&gt;means the end points are included in the interval&lt;/STRONG&gt;. So if you're 39.99 you're outside the interval but if you're 40 you're in the interval.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IF  KG_variable &amp;gt;= 40 AND KG_variable &amp;lt;=200 then do;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;This is an AND condition, not an OR condition.&amp;nbsp;&lt;/SPAN&gt;&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/319930"&gt;@veda8&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Ensure that all values for variable&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;are between 40 and 200, inclusively.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;STRONG&gt;what does the word inclusive mean here&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;should it be this option 1) ,if so why?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if Kilograms ge 40 or Kilograms le 200 then do;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;is this correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or should i write kilograms &amp;gt; 40 or kilograms =40 or kilograms =200 or kilograms &amp;lt; 200 them do;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 16:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671100#M23361</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-21T16:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: range in if statment</title>
      <link>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671106#M23362</link>
      <description>&lt;P&gt;SAS is friendly it allowing intervals to be written, when needed as&amp;nbsp;&amp;nbsp;&amp;nbsp; value1 &amp;lt; variable &amp;lt; value2 .&lt;/P&gt;
&lt;P&gt;So for this one I would use&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 le kilograms le 200&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you remember the difference from a math class between these intervals:&lt;/P&gt;
&lt;P&gt;(40, 200)&lt;/P&gt;
&lt;P&gt;[40,200)&lt;/P&gt;
&lt;P&gt;(40,200]&lt;/P&gt;
&lt;P&gt;[40,200]&lt;/P&gt;
&lt;P&gt;The [ or ] are the end point of the interval is included (i.e. "inclusive") and ( or ) the end point is not included, (i.e. "exclusive"),&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 16:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671106#M23362</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-21T16:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: range in if statment</title>
      <link>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671294#M23374</link>
      <description>&lt;P&gt;The result of the boolean OR operator is true if at least one of its arguments is true. So your condition will be true for &lt;EM&gt;all&lt;/EM&gt;&amp;nbsp;possible values.&lt;/P&gt;
&lt;P&gt;You therefore need the AND operator, but SAS nicely allows to concatenate such conditions to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;40 le kilograms le 200&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 07:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/range-in-if-statment/m-p/671294#M23374</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-22T07:12:35Z</dc:date>
    </item>
  </channel>
</rss>

