<?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: match merging in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181221#M46154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did also ask that question.&lt;/P&gt;&lt;P&gt;Is it possible type has other values as indicated? The place of otherwise....&lt;/P&gt;&lt;P&gt;If there is no join missing an e-file record those values normally coming from wil be missing.&lt;/P&gt;&lt;P&gt;Can you give more details test data what is not going confirm your expectations?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2014 14:19:04 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-09-01T14:19:04Z</dc:date>
    <item>
      <title>match merging</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181218#M46151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;I need your&amp;nbsp; help please &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i am supposed to match two datasets and create 3 groups out of this merging.&lt;/P&gt;&lt;P&gt;I have Dataset A with x,y,z and Dataset B with x,y,z,indicator and i merge A and B by x,y&lt;/P&gt;&lt;P&gt;First group would be all leads from A that are in B where Indicator='Y'&lt;/P&gt;&lt;P&gt;Group two -- all leads from A in B where Indicator='N' &lt;/P&gt;&lt;P&gt;and Group three is one+two + remaining from B(non-matching)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this is&amp;nbsp; how i start with&lt;/P&gt;&lt;P&gt;Data one two three;&lt;/P&gt;&lt;P&gt;merge A(in=ina) B(in=inb);&lt;/P&gt;&lt;P&gt;by x,y;&lt;/P&gt;&lt;P&gt;if ina and inb and indicator='YES'&amp;nbsp; then do; type='A_yes'; output one three;end;&lt;/P&gt;&lt;P&gt;else if ina and inb and indicator='NO' then do; type='A_no;output two three;end;&lt;/P&gt;&lt;P&gt;else do; type='B';output three;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont get for "three" what i am supposed to get.I know&amp;nbsp; the logic for that group is not right but dont know how to set it&amp;nbsp; up&amp;nbsp; properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The final group(group three) should have something like:&lt;/P&gt;&lt;P&gt;x y z indicator type&lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;1 2 3 yes A_yes&lt;/P&gt;&lt;P&gt;2 3 4 yes B&lt;/P&gt;&lt;P&gt;4 5 6 no A_no&lt;/P&gt;&lt;P&gt;2 2 3&amp;nbsp; no B&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;so combination from one two and&amp;nbsp; the non-matching from B bit not working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get something&amp;nbsp; like&lt;/P&gt;&lt;P&gt;x y z indicator type&lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;1 2 3 yes A_yes&lt;/P&gt;&lt;P&gt;. . . .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;4 5 6 no A_no&lt;/P&gt;&lt;P&gt;. . . .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so for the non-matching i only&amp;nbsp; get the "type" values.Rest is missing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts please &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 00:59:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181218#M46151</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2014-09-01T00:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: match merging</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181219#M46152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Us the nesting and ordereing in a more readable way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ina and inb&amp;nbsp; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When ( indicator='YES)&amp;nbsp; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type='A_yes'; output one three;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When ( indicator='NO' ) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type='A_no;output two three;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Otherwise ;&amp;nbsp; /* is this option possible ??&amp;nbsp; merged and indicatior not no or yes&amp;nbsp;&amp;nbsp; */&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if not ina and inb&amp;nbsp; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; type='B'; output&amp;nbsp; three;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 06:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181219#M46152</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-01T06:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: match merging</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181220#M46153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your response Jaap&lt;/P&gt;&lt;P&gt;I tried with your code but still getting missing values for the third group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 13:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181220#M46153</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2014-09-01T13:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: match merging</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181221#M46154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did also ask that question.&lt;/P&gt;&lt;P&gt;Is it possible type has other values as indicated? The place of otherwise....&lt;/P&gt;&lt;P&gt;If there is no join missing an e-file record those values normally coming from wil be missing.&lt;/P&gt;&lt;P&gt;Can you give more details test data what is not going confirm your expectations?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181221#M46154</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-01T14:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: match merging</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181222#M46155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it actually works now,weird.&lt;/P&gt;&lt;P&gt;Client_type is a new variable that i was trying to create with different values for each criteria but thanks for your time and help Jaap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 20:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/match-merging/m-p/181222#M46155</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2014-09-01T20:51:55Z</dc:date>
    </item>
  </channel>
</rss>

