<?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: issue when matching names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609232#M177364</link>
    <description>&lt;P&gt;You should also be doing other checks. Is name unique on both files? If not how do you know if you are joining the right Anna Smith on one file with the right Anna Smith on the other? Can you use other columns to improve joining accuracy?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 01:43:40 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-12-04T01:43:40Z</dc:date>
    <item>
      <title>issue when matching names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609217#M177362</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i have 2 tables&amp;nbsp; which i need to match&amp;nbsp; by name but the match is not 100% and&amp;nbsp; the names are in both tables.&lt;/P&gt;
&lt;P&gt;I specifically investigated those names that did not give me the match and they have a different length in both tables.&lt;/P&gt;
&lt;P&gt;The ones&amp;nbsp; that match have the same length .I&amp;nbsp; &amp;nbsp;pulled&amp;nbsp; a few of the names&amp;nbsp; that&amp;nbsp; don't give me a match from both&amp;nbsp; tables and&amp;nbsp; seems like&amp;nbsp; they are bad in on the datasets&amp;nbsp; The&amp;nbsp; first table would show me an output such as&amp;nbsp; name="Anna Smith",the other table breaks the&amp;nbsp; output in 2 lines&amp;nbsp; &amp;nbsp;name='Anna&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Smith'&lt;/P&gt;
&lt;P&gt;and they have different length . I thought it was a&amp;nbsp; space issue, so i tried compress ,STRIP,trim... u name it&amp;nbsp; but nothing worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any solution that would fix this issue,anyone please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS.If&amp;nbsp; i go back to the excel&amp;nbsp; files these 2 datasets are created of and&amp;nbsp; re-enter those&amp;nbsp; names manually and&amp;nbsp; re run everything it matches perfectly but&amp;nbsp; don't think&amp;nbsp; that would be&amp;nbsp; a solution on a long term&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 00:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609217#M177362</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2019-12-04T00:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: issue when matching names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609228#M177363</link>
      <description>&lt;P&gt;Check and compare both sides names using hex value:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;put(compress(name),$hex50.);&lt;/P&gt;
&lt;P&gt;the length (50) should be, at least, twice the supposed length.&lt;/P&gt;
&lt;P&gt;In your example&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;"Anna Smith"&lt;/SPAN&gt;&lt;/STRONG&gt; length is 10 then use $hex24. or more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Coming from excel it may be a result of break-line in a cell or some other control character.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 01:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609228#M177363</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-12-04T01:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: issue when matching names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609232#M177364</link>
      <description>&lt;P&gt;You should also be doing other checks. Is name unique on both files? If not how do you know if you are joining the right Anna Smith on one file with the right Anna Smith on the other? Can you use other columns to improve joining accuracy?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 01:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609232#M177364</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-12-04T01:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: issue when matching names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609538#M177477</link>
      <description>&lt;P&gt;thanks&amp;nbsp; for&amp;nbsp; your input Shmuel,tried it and&amp;nbsp; still&amp;nbsp; same issue. Got to be a&amp;nbsp; control&amp;nbsp; character. Asked&amp;nbsp; business to&amp;nbsp; fix their excel&amp;nbsp; file&lt;/P&gt;
&lt;P&gt;Thanks anyway guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;T&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 21:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609538#M177477</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2019-12-04T21:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: issue when matching names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609576#M177487</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34400"&gt;@Tal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One step for preparing the names for matching could be to replace all white-space characters with a blank and to upcase the string.&lt;/P&gt;
&lt;P&gt;Below line of code is doing this. Consecutive white-space characters will get replaced by a single blank.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;nameMatch=upcase(prxchange('s/\s+/ /oi',-1,strip(name)));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  name=cats('Anna','0a'x,'09'x,'Smith');
  nameMatch=upcase(prxchange('s/\s+/ /oi',-1,strip(name)));
  name_Hex=put(strip(name),hex.);
  nameMatch_Hex=put(strip(nameMatch),hex.);
  output;
  stop;
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 00:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-when-matching-names/m-p/609576#M177487</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-12-05T00:18:23Z</dc:date>
    </item>
  </channel>
</rss>

