<?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 Using Boolean Logic (AND, OR, and NOT Operators) in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588880#M7956</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am&amp;nbsp; Base SAS Student.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to&amp;nbsp;do a Combining Various Boolean Operators but I was get some error to execute this below code. First I had making New Database then I tried to combine data with using Boolean Logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using this code but it didn’t work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, the data set Medical contains information on clinic, diagnosis (DX), and weight. A program to list all patients who were seen at the HMC clinic and had either a diagnosis 7 or 9 or weighted over 180 pounds demonstrates how to combine various Boolean operators:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data Learning_From_Medical;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Length Id $ 3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VisitDate $ 10;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Input Id Clinic $ DX Weight VisitDate;&lt;BR /&gt;Cards;&lt;BR /&gt;001 HMX 18 220 05/08/2006&lt;BR /&gt;003 TDX 8 265 02/06/2006&lt;BR /&gt;005 HTX 20 285 04/04/2006&lt;BR /&gt;004 HMC 9 185 25/07/2006&lt;BR /&gt;025 TFT 7 272 28/06/2006&lt;BR /&gt;032 HMX 12 160 18/02/2006&lt;BR /&gt;065 TDX 28 289 16/03/2006&lt;BR /&gt;072 HTX 32 255 12/09/2006&lt;BR /&gt;099 TFT 44 112 09/09/2006&lt;BR /&gt;050 HMC 88 198 12/12/2006&lt;BR /&gt;065 HTX 120 250 02/07/2006&lt;BR /&gt;002 HMC 7 162 20/11/2006&lt;BR /&gt;008 TDX 65 277 15/08/2006&lt;BR /&gt;012 HMC 12 222 14/04/2006&lt;BR /&gt;006 TFT 6 666 06/06/2006&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Title "Example of Boolan Expressions";&lt;BR /&gt;Proc print Data=learning_from_medical;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where Clinic eq 'HMC' and&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (DX in ('7','9') or&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Weight gt 180);&lt;BR /&gt;id ID;&lt;BR /&gt;var Clinic DX Weight VisitDate;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22222222222.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32482iCC8B5A56CE72BA3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="22222222222.jpg" alt="22222222222.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone please give me the exact code to solve this error?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 15 Sep 2019 20:55:06 GMT</pubDate>
    <dc:creator>Meet_SAS</dc:creator>
    <dc:date>2019-09-15T20:55:06Z</dc:date>
    <item>
      <title>Using Boolean Logic (AND, OR, and NOT Operators)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588880#M7956</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am&amp;nbsp; Base SAS Student.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to&amp;nbsp;do a Combining Various Boolean Operators but I was get some error to execute this below code. First I had making New Database then I tried to combine data with using Boolean Logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using this code but it didn’t work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, the data set Medical contains information on clinic, diagnosis (DX), and weight. A program to list all patients who were seen at the HMC clinic and had either a diagnosis 7 or 9 or weighted over 180 pounds demonstrates how to combine various Boolean operators:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data Learning_From_Medical;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Length Id $ 3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VisitDate $ 10;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Input Id Clinic $ DX Weight VisitDate;&lt;BR /&gt;Cards;&lt;BR /&gt;001 HMX 18 220 05/08/2006&lt;BR /&gt;003 TDX 8 265 02/06/2006&lt;BR /&gt;005 HTX 20 285 04/04/2006&lt;BR /&gt;004 HMC 9 185 25/07/2006&lt;BR /&gt;025 TFT 7 272 28/06/2006&lt;BR /&gt;032 HMX 12 160 18/02/2006&lt;BR /&gt;065 TDX 28 289 16/03/2006&lt;BR /&gt;072 HTX 32 255 12/09/2006&lt;BR /&gt;099 TFT 44 112 09/09/2006&lt;BR /&gt;050 HMC 88 198 12/12/2006&lt;BR /&gt;065 HTX 120 250 02/07/2006&lt;BR /&gt;002 HMC 7 162 20/11/2006&lt;BR /&gt;008 TDX 65 277 15/08/2006&lt;BR /&gt;012 HMC 12 222 14/04/2006&lt;BR /&gt;006 TFT 6 666 06/06/2006&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Title "Example of Boolan Expressions";&lt;BR /&gt;Proc print Data=learning_from_medical;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where Clinic eq 'HMC' and&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (DX in ('7','9') or&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Weight gt 180);&lt;BR /&gt;id ID;&lt;BR /&gt;var Clinic DX Weight VisitDate;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22222222222.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32482iCC8B5A56CE72BA3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="22222222222.jpg" alt="22222222222.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone please give me the exact code to solve this error?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 20:55:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588880#M7956</guid>
      <dc:creator>Meet_SAS</dc:creator>
      <dc:date>2019-09-15T20:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Boolean Logic (AND, OR, and NOT Operators)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588886#M7957</link>
      <description>&lt;P&gt;since DX is a numeric variable we need to use numeric values without the quotes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc print Data=learning_from_medical;
            where Clinic eq 'HMC' and
            (DX in (7,9) or
             Weight gt 180);
id ID;
var Clinic DX Weight VisitDate;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Sep 2019 21:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588886#M7957</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-15T21:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Boolean Logic (AND, OR, and NOT Operators)</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588944#M7958</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you so much!&amp;nbsp;I have the output this time.&amp;nbsp;&amp;nbsp;&amp;nbsp;Again, thank you for your time and your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 06:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Using-Boolean-Logic-AND-OR-and-NOT-Operators/m-p/588944#M7958</guid>
      <dc:creator>Meet_SAS</dc:creator>
      <dc:date>2019-09-16T06:05:48Z</dc:date>
    </item>
  </channel>
</rss>

