<?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 Drop all observations from an id if id appears in a given list in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Drop-all-observations-from-an-id-if-id-appears-in-a-given-list/m-p/474169#M121785</link>
    <description>&lt;P&gt;I have a dataset "excluded_id" that has&amp;nbsp;unique&amp;nbsp;people identified by varA varB varC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then a master dataset "all_claims", with multiple observations per unique person (as identified by a unique combo of&amp;nbsp;&lt;SPAN&gt;varA varB varC)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How might I drop all observations in "all_claims" tied to a given person, if that person shows up in excluded_id?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically&amp;nbsp;the pseudocode is something like:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data final;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set all_claims;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where varA varB varC not in (excluded_id);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The trick is that each unique person is identified by a unique combo of varA varB varC...&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 17:06:27 GMT</pubDate>
    <dc:creator>cdubs</dc:creator>
    <dc:date>2018-06-28T17:06:27Z</dc:date>
    <item>
      <title>Drop all observations from an id if id appears in a given list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-all-observations-from-an-id-if-id-appears-in-a-given-list/m-p/474169#M121785</link>
      <description>&lt;P&gt;I have a dataset "excluded_id" that has&amp;nbsp;unique&amp;nbsp;people identified by varA varB varC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then a master dataset "all_claims", with multiple observations per unique person (as identified by a unique combo of&amp;nbsp;&lt;SPAN&gt;varA varB varC)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How might I drop all observations in "all_claims" tied to a given person, if that person shows up in excluded_id?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically&amp;nbsp;the pseudocode is something like:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data final;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set all_claims;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where varA varB varC not in (excluded_id);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The trick is that each unique person is identified by a unique combo of varA varB varC...&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 17:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-all-observations-from-an-id-if-id-appears-in-a-given-list/m-p/474169#M121785</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2018-06-28T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Drop all observations from an id if id appears in a given list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-all-observations-from-an-id-if-id-appears-in-a-given-list/m-p/474172#M121787</link>
      <description>&lt;P&gt;** UNTESTED CODE **&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assumes both data sets are sorted by varA varB varC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data final;
     merge all_claims(in=in1) excluded_id(in=in2);
     by varA varB varC;
     where in1 and not in2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jun 2018 17:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-all-observations-from-an-id-if-id-appears-in-a-given-list/m-p/474172#M121787</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-06-28T17:13:36Z</dc:date>
    </item>
  </channel>
</rss>

