<?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: Help with merging via names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111217#M259002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to clean the data. But that is not easy. So there are two ways.&lt;/P&gt;&lt;P&gt;1. sort and summarise the data by the company name. So you should be able to see the differences and then use this result to clean the company names using tranwrd function applying to the main data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'mgmt','Management');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'Mgmt','Management');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'co','Comapny');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'Co','Comapny');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use all of the above in the same data step.&lt;/P&gt;&lt;P&gt;after the cleaning again summarise and check and clean. You might have to summarise few times until the entire data is cleaned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Depending on you data, you can also follow the above procedure but before doing that you can split the company name in two or three parts using the scan function and then summarise on those words. This way you should be able to find the different spellings and clean them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Oct 2013 23:37:38 GMT</pubDate>
    <dc:creator>Mit</dc:creator>
    <dc:date>2013-10-13T23:37:38Z</dc:date>
    <item>
      <title>Help with merging via names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111214#M258999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two data sets. I want to merge them with company names. But there are some variations in the company names. For example, mgmt vs. management, company vs. co, limited vs. ltd, and vs. &amp;amp;, etc. Also, there might be extra blanks in the names. Can someone tell me how to deal with this issue? And some reference I can use to do this merge? THanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Oct 2013 22:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111214#M258999</guid>
      <dc:creator>SeanZ</dc:creator>
      <dc:date>2013-10-12T22:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merging via names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111215#M259000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SeanZ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there will be a supporting variable for company name in numeric (i think) if it is in this cases.&amp;nbsp; check for that variable which will have some code for each company;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there no such thing just make it through hard coding like,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if companyname='management' then companycode=1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in both datasets then you can merge them by this new variable created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Durga.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 08:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111215#M259000</guid>
      <dc:creator>DR_Majeti</dc:creator>
      <dc:date>2013-10-13T08:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merging via names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111216#M259001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you undertake some analysis to identify and replace strings such as 'co' with 'company' and the like. &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt; may help you replace these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as merging by name is concerned you could sing a fuzzy merge using COMPGED &lt;A href="http://www.nesug.org/proceedings/nesug07/ap/ap23.pdf" title="http://www.nesug.org/proceedings/nesug07/ap/ap23.pdf"&gt;http://www.nesug.org/proceedings/nesug07/ap/ap23.pdf&lt;/A&gt;.&amp;nbsp; This will require some analysis and feel for your data, but I have has success with it in the past.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 22:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111216#M259001</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-10-13T22:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merging via names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111217#M259002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to clean the data. But that is not easy. So there are two ways.&lt;/P&gt;&lt;P&gt;1. sort and summarise the data by the company name. So you should be able to see the differences and then use this result to clean the company names using tranwrd function applying to the main data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'mgmt','Management');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'Mgmt','Management');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'co','Comapny');&lt;/P&gt;&lt;P&gt;company=tranwrd(compay,'Co','Comapny');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use all of the above in the same data step.&lt;/P&gt;&lt;P&gt;after the cleaning again summarise and check and clean. You might have to summarise few times until the entire data is cleaned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Depending on you data, you can also follow the above procedure but before doing that you can split the company name in two or three parts using the scan function and then summarise on those words. This way you should be able to find the different spellings and clean them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 23:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-merging-via-names/m-p/111217#M259002</guid>
      <dc:creator>Mit</dc:creator>
      <dc:date>2013-10-13T23:37:38Z</dc:date>
    </item>
  </channel>
</rss>

