<?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: Merging Two data sets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351313#M81773</link>
    <description>&lt;P&gt;This is data management, combing datasets, which is handled either in a data step or proc SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data want;&lt;/P&gt;
&lt;P&gt;set A B indsname=source;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;source_dsn = source;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Relevant reference, there's many examples here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 14:12:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-04-19T14:12:32Z</dc:date>
    <item>
      <title>Merging Two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351311#M81771</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets called A and &amp;nbsp;B- group B is a subset of group A (everyone in group B should be in group A), and group B is the people who had an event/outcome, and ultimately I'd like to have a master dataset w. people who had an event and who had not had an event. Then I would like to have a new variable (e.g. outcome) and assign values so that everyone from B should have 1 and the rest of the people have 0. What SAS procedures should I use? Any suggestion/examples would be greatly appreciated.&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351311#M81771</guid>
      <dc:creator>Kiko</dc:creator>
      <dc:date>2017-04-19T14:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351312#M81772</link>
      <description>&lt;P&gt;This is pretty straighforward if you provide some sample data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351312#M81772</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-19T14:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351313#M81773</link>
      <description>&lt;P&gt;This is data management, combing datasets, which is handled either in a data step or proc SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data want;&lt;/P&gt;
&lt;P&gt;set A B indsname=source;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;source_dsn = source;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Relevant reference, there's many examples here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351313#M81773</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-19T14:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351314#M81774</link>
      <description>&lt;P&gt;Similar questions are asked at least daily, please use the search functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New documentation site: &lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=basewn&amp;amp;docsetTarget=helpcenterfeedback.htm&amp;amp;locale=de" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=basewn&amp;amp;docsetTarget=helpcenterfeedback.htm&amp;amp;locale=de&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Related to your problem: &lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=basess&amp;amp;docsetTarget=p19t3r1gxavpoin14jdd23gcheve.htm&amp;amp;locale=de" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=basess&amp;amp;docsetTarget=p19t3r1gxavpoin14jdd23gcheve.htm&amp;amp;locale=de&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351314#M81774</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2017-04-19T14:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351315#M81775</link>
      <description>&lt;P&gt;If B is a subset of A, you could use this approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=a;&lt;/P&gt;
&lt;P&gt;by id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=b;&lt;/P&gt;
&lt;P&gt;by id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;merge a b (in=b);&lt;/P&gt;
&lt;P&gt;by id;&lt;/P&gt;
&lt;P&gt;outcome=b;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You haven't told us the names of your variables, so I'm using ID here as the common variable to match on.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-data-sets/m-p/351315#M81775</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-19T14:22:35Z</dc:date>
    </item>
  </channel>
</rss>

