<?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 Remove observations from one dataset based upon a list in another in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125231#M34408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets.&amp;nbsp; Dataset A has all the raw data where each subject ID code has multiple (sometimes thousands) of observations for it.&amp;nbsp; Dataset B has a list of subject ID codes that need to be removed from Dataset A (i.e., if the ID code is in Dataset B then all observations linked to the ID code need to be removed from Dataset A).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking it would seem like a job for proc sql, but don't know how to go about it.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Oct 2013 14:44:13 GMT</pubDate>
    <dc:creator>yeaforme</dc:creator>
    <dc:date>2013-10-27T14:44:13Z</dc:date>
    <item>
      <title>Remove observations from one dataset based upon a list in another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125231#M34408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets.&amp;nbsp; Dataset A has all the raw data where each subject ID code has multiple (sometimes thousands) of observations for it.&amp;nbsp; Dataset B has a list of subject ID codes that need to be removed from Dataset A (i.e., if the ID code is in Dataset B then all observations linked to the ID code need to be removed from Dataset A).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking it would seem like a job for proc sql, but don't know how to go about it.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 14:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125231#M34408</guid>
      <dc:creator>yeaforme</dc:creator>
      <dc:date>2013-10-27T14:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Remove observations from one dataset based upon a list in another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125232#M34409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sort data=dataset_A;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=dataset_B;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge dataset_A(in=a) dataset_B(in=b);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if a and not b;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by proc sql;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table want as select a.* from dataset_A as a, dataset_b as b where a.id^=b.id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 14:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125232#M34409</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-10-27T14:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove observations from one dataset based upon a list in another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125233#M34410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SQL code creates a cartesian product that takes forever to run before timing out after it has consumed all available memory, but the data merge code above it works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 04:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-observations-from-one-dataset-based-upon-a-list-in/m-p/125233#M34410</guid>
      <dc:creator>yeaforme</dc:creator>
      <dc:date>2013-10-28T04:02:24Z</dc:date>
    </item>
  </channel>
</rss>

