<?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: firm with the same name but different id number in different years, how can I change the id into the same one in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139219#M261414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Agree with Urwish's code for your concern. Try it&lt;/P&gt;&lt;P&gt;Thanks Urwish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jan 2014 09:25:04 GMT</pubDate>
    <dc:creator>umashankersaini</dc:creator>
    <dc:date>2014-01-13T09:25:04Z</dc:date>
    <item>
      <title>firm with the same name but different id number in different years, how can I change the id into the same one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139215#M261410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some firm data with more half a million firms. I found some firms with the same name have different id numbers in different years. I comfirmed by firm address that the firm with the same name but with different id numbers is actually the same firm.&lt;/P&gt;&lt;P&gt;I wonder how I can change the id number to be the same for each unique firm. Thanks!&amp;nbsp; The sample is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="387"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="72"&gt;year&lt;/TD&gt;&lt;TD class="xl63" width="107"&gt;id&lt;/TD&gt;&lt;TD class="xl63" width="208"&gt;name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1996&lt;/TD&gt;&lt;TD class="xl63"&gt;600535930&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1997&lt;/TD&gt;&lt;TD class="xl63"&gt;600535930&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1998&lt;/TD&gt;&lt;TD class="xl63"&gt;600535930&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1999&lt;/TD&gt;&lt;TD class="xl63"&gt;730135548&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2000&lt;/TD&gt;&lt;TD class="xl63"&gt;730135548&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2001&lt;/TD&gt;&lt;TD class="xl63"&gt;730135548&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2002&lt;/TD&gt;&lt;TD class="xl63"&gt;730135548&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2003&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2004&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2005&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2006&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2007&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2008&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2009&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2010&lt;/TD&gt;&lt;TD class="xl63"&gt;745995778&lt;/TD&gt;&lt;TD class="xl63"&gt;ABC international&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1996&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1997&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1998&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;1999&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2000&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2001&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2002&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2003&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2004&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2005&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2006&lt;/TD&gt;&lt;TD class="xl63"&gt;730415910&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2007&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2008&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2009&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="18"&gt;2010&lt;/TD&gt;&lt;TD class="xl63"&gt;737993908&lt;/TD&gt;&lt;TD class="xl63"&gt;TBL data inquiry&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 08:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139215#M261410</guid>
      <dc:creator>owenwqp1</dc:creator>
      <dc:date>2014-01-13T08:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: firm with the same name but different id number in different years, how can I change the id into the same one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139216#M261411</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;if you are confirmed with the ID number then :&lt;/P&gt;&lt;P&gt;the easiest and straight way is to use if then statement with data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if name ='ABC international' then id = 'XXXXXXXXXX' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would make the unique id for ABC international.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not satisfied with this..... we have lots of options to change to unique.&lt;/P&gt;&lt;P&gt;just let us know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Uma Shanker Saini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 08:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139216#M261411</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2014-01-13T08:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: firm with the same name but different id number in different years, how can I change the id into the same one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139217#M261412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uma!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But actually, some names also have some slight differences, mainly due to misspelling. I have changed the names into the same if they share the same id number. My problem is how to change the remaining observations with some differences in both id and name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 09:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139217#M261412</guid>
      <dc:creator>owenwqp1</dc:creator>
      <dc:date>2014-01-13T09:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: firm with the same name but different id number in different years, how can I change the id into the same one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139218#M261413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #000000; font-size: 11pt;"&gt;Hi, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #000000; font-size: 11pt;"&gt;I assumed first ID(that is ID of 1996 in this case) will be same to all different Firms...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; = have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; temp(keep = id name);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; first.name &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; want(drop = id);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; year id unique_id name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;merge&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; have temp(rename = (id = unique_id));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;-Urvish&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 09:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139218#M261413</guid>
      <dc:creator>UrvishShah</dc:creator>
      <dc:date>2014-01-13T09:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: firm with the same name but different id number in different years, how can I change the id into the same one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139219#M261414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Agree with Urwish's code for your concern. Try it&lt;/P&gt;&lt;P&gt;Thanks Urwish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 09:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/firm-with-the-same-name-but-different-id-number-in-different/m-p/139219#M261414</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2014-01-13T09:25:04Z</dc:date>
    </item>
  </channel>
</rss>

