<?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: Conditional Merge in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667302#M79068</link>
    <description>&lt;P&gt;This worked, but the final data set only contains observations that met those conditional statements. Is there a way to retain &lt;EM&gt;all&lt;/EM&gt; observations regardless of whether they merge given the specified conditions?&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 21:37:50 GMT</pubDate>
    <dc:creator>raivester</dc:creator>
    <dc:date>2020-07-06T21:37:50Z</dc:date>
    <item>
      <title>Conditional Merge</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667298#M79066</link>
      <description>&lt;P&gt;I was wondering if anyone could share how to merge two data sets conditionally. The following is a simplified example of what I am trying to do. I have two data sets and each is unique at the &lt;STRONG&gt;individ_id_num&lt;/STRONG&gt; and &lt;STRONG&gt;year&lt;/STRONG&gt; level. The &lt;STRONG&gt;year&lt;/STRONG&gt; variable ranges from 2000-2020.&amp;nbsp;&amp;nbsp;I only want the merge to occur for &lt;STRONG&gt;year&lt;/STRONG&gt;=2018. Is there some way to specify merge only if &lt;STRONG&gt;year&lt;/STRONG&gt;=2018 in both data sets?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667298#M79066</guid>
      <dc:creator>raivester</dc:creator>
      <dc:date>2020-07-06T20:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Merge</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667299#M79067</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    merge have1(where=(year=2018) in=in1) have2(where=(year=2018) in=in2);
    by indiv_id_num;
    if in1 and in2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Assumes have1 and have2 are properly sorted by indiv_id_num.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 21:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667299#M79067</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-06T21:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Merge</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667302#M79068</link>
      <description>&lt;P&gt;This worked, but the final data set only contains observations that met those conditional statements. Is there a way to retain &lt;EM&gt;all&lt;/EM&gt; observations regardless of whether they merge given the specified conditions?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 21:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Conditional-Merge/m-p/667302#M79068</guid>
      <dc:creator>raivester</dc:creator>
      <dc:date>2020-07-06T21:37:50Z</dc:date>
    </item>
  </channel>
</rss>

