<?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: Join two files based on name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726784#M225898</link>
    <description>Thank you very much Sajid01.&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Mar 2021 14:53:18 GMT</pubDate>
    <dc:creator>abdulla</dc:creator>
    <dc:date>2021-03-16T14:53:18Z</dc:date>
    <item>
      <title>Join two files based on name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726660#M225824</link>
      <description>&lt;P&gt;Hi, I have attached two files. I have thousands of data. I want to join two files based on the name. In one file full name is given and in another file names are split based on forename, surname etc. Can any one please help me? I have given here some examples of my data. There are a lot of matches in my original complete dataset. In the example files, matches may not be high as I trimmed the files.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726660#M225824</guid>
      <dc:creator>abdulla</dc:creator>
      <dc:date>2021-03-16T09:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Join two files based on name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726689#M225835</link>
      <description>&lt;P&gt;Please post sample data in a usable form, preferably as a data step. Also, please provide a clear description of your problem and your desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most users here will not download files from the community.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 10:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726689#M225835</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-03-16T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Join two files based on name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726760#M225878</link>
      <description>&lt;P&gt;1.Based upon your data I have created a sample code for join. Modify depending upon your needs.&lt;/P&gt;&lt;P&gt;2.Created two variable ename1 and ename2 solely to serve the purpose of join. They can be deleted later on.&lt;BR /&gt;2..In the proc sql&amp;nbsp; step I have retained the new variables ename1 and ename2 to show that the match works.&lt;BR /&gt;&amp;nbsp; I expect that it will be modified to include the variable that are needed and drop the ename's .&lt;BR /&gt;Let me know if you have questions.&lt;/P&gt;&lt;P&gt;proc import file="path_to_avs.xls" out=avs dbms=xls replace;&lt;BR /&gt;getnames=yes;&lt;BR /&gt;run;&lt;BR /&gt;proc import file="path_to_avs1.xls" out=avs1 dbms=xls replace;&lt;BR /&gt;getnames=yes;&lt;BR /&gt;run;&lt;BR /&gt;/*Remove the dots and commas*/&lt;BR /&gt;data avs01;&lt;BR /&gt;set avs;&lt;BR /&gt;ename1=compress(translate(EXEC_FULLNAME,'','.,'));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data avs10;&lt;BR /&gt;set avs1;&lt;BR /&gt;ename2=compress(cat(Forename1,forename2,Surname));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table joined_table as&lt;BR /&gt;select a.ename1,b.ename2 from avs01 a, avs10 b&lt;BR /&gt;where a.ename1=b.ename2;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 13:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726760#M225878</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-03-16T13:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Join two files based on name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726784#M225898</link>
      <description>Thank you very much Sajid01.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-files-based-on-name/m-p/726784#M225898</guid>
      <dc:creator>abdulla</dc:creator>
      <dc:date>2021-03-16T14:53:18Z</dc:date>
    </item>
  </channel>
</rss>

