<?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: Non matching obsetvations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320730#M70676</link>
    <description>consider that both the datasets have1 and hav1 are sorted by variables A and B. &lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;merge have1(in=a) hav1(in=b);&lt;BR /&gt;by A B;&lt;BR /&gt;if a and not b;&lt;BR /&gt;run;&lt;BR /&gt;</description>
    <pubDate>Thu, 22 Dec 2016 13:19:29 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2016-12-22T13:19:29Z</dc:date>
    <item>
      <title>Non matching obsetvations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320727#M70673</link>
      <description>&lt;P&gt;Hi All &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following problem. I have two datasets have1 and hav1 as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have1;
   input A $ B C;
   datalines;
   Peter 10 100
   Peter 20 300
   Anna  36 900
   Kelly 80 700
   Kelly 40 400
   Kelly 70 800
   Max   45 951
   Max   12 752
   ;

data have2;
   input A $ B C;
   datalines;
   Peter 10 100
   Anna  36 900
   Kelly 80 700
   Kelly 70 800
   Max   12 752
   James 46 943
   ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I want to extract the observations in have1 that do not exist in have2, which in this case makes my WANT dataset looking like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input A $ B C;
   datalines;
Peter 20 300
Kelly 40 400
Max   45 951
   ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 13:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320727#M70673</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2016-12-22T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Non matching obsetvations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320729#M70675</link>
      <description>&lt;P&gt;SQL has a nice except join&amp;nbsp;for this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT as 
  select  A,B,C
  from    HAVE 1
  except select A,B,C from HAVE2;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2016 13:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320729#M70675</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-12-22T13:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Non matching obsetvations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320730#M70676</link>
      <description>consider that both the datasets have1 and hav1 are sorted by variables A and B. &lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;merge have1(in=a) hav1(in=b);&lt;BR /&gt;by A B;&lt;BR /&gt;if a and not b;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Dec 2016 13:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320730#M70676</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-12-22T13:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Non matching obsetvations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320731#M70677</link>
      <description>&lt;P&gt;Very cool, thank you both &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 13:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-matching-obsetvations/m-p/320731#M70677</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2016-12-22T13:24:16Z</dc:date>
    </item>
  </channel>
</rss>

