<?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 Create dataset with records who's not in dataset1 and dataset2 in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584920#M14239</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets. Lets call them dataset1 and dataset2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a third dataset&amp;nbsp;who contains records&amp;nbsp;not in both dataset based on my keyvar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards Frank&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 12:47:59 GMT</pubDate>
    <dc:creator>frakje</dc:creator>
    <dc:date>2019-08-29T12:47:59Z</dc:date>
    <item>
      <title>Create dataset with records who's not in dataset1 and dataset2</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584920#M14239</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets. Lets call them dataset1 and dataset2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a third dataset&amp;nbsp;who contains records&amp;nbsp;not in both dataset based on my keyvar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards Frank&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 12:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584920#M14239</guid>
      <dc:creator>frakje</dc:creator>
      <dc:date>2019-08-29T12:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset with records who's not in dataset1 and dataset2</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584923#M14240</link>
      <description>&lt;P&gt;How can you&amp;nbsp;&lt;SPAN&gt;create a third dataset&amp;nbsp;who contains records&amp;nbsp;&lt;STRONG&gt;not in "&lt;U&gt;both"&lt;/U&gt; datase&lt;/STRONG&gt;t based on my keyvar.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are you looking for EXCEPT rule?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 12:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584923#M14240</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-29T12:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset with records who's not in dataset1 and dataset2</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584926#M14242</link>
      <description>&lt;P&gt;Let me try to explain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two different datasets with different variables. Both of them contain a Danish 'CPR' number&amp;nbsp;which in this situation is my ID var.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A patient can be in dataset1 and not in dataset2 and opposite. I want to find those patients whos not in both datasets based on my&amp;nbsp;ID var.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In STATA I can use 'merge' and choose those patients where there is no match.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I do something similar in sas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 13:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584926#M14242</guid>
      <dc:creator>frakje</dc:creator>
      <dc:date>2019-08-29T13:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset with records who's not in dataset1 and dataset2</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584931#M14246</link>
      <description>&lt;P&gt;See this simplified example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input CPR $;
datalines;
123
456
789
;

data two;
input CPR $;
datalines;
000
123
789
;

data check;
merge
  one (in=one)
  two (in=two)
;
by CPR;
if not (one and two);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Both datasets need to be sorted by CPR.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 13:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-dataset-with-records-who-s-not-in-dataset1-and-dataset2/m-p/584931#M14246</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-29T13:40:53Z</dc:date>
    </item>
  </channel>
</rss>

