<?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: FINDING MATCHED COUNTERPARTS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83251#M23890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, allowing duplicates is fine. I like the database 3 I am receiving, however I wonder is it possible to tweak the code to add one more restriction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So matching the data on 4 levels of criterion:&lt;/P&gt;&lt;P&gt;-Industry (must be the same number)&lt;/P&gt;&lt;P&gt;-Year (must be the same year)&lt;/P&gt;&lt;P&gt;-Size ( the closet match available )&lt;/P&gt;&lt;P&gt;-BM ratio ( the closet match available given matching industry, matching year and closet size)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By adding one more restriction this reduces the number of observations in the event firm DB1 to 5085. Still looking to match each observation with a non event firm db2 thankfully this database is still rather large about 1mill observations for SAS to select from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the final product would be much the same:&lt;/P&gt;&lt;P&gt;Database 3: Matched database. This contains 5085 event firms and its counterpart, the matched non event firm.&amp;nbsp; DB3 holds the following headings: Permno1, Dclrdt, marketcap1, Year1 , industry1, mbratio1, Permno2, Marketcap2, year2, industry2 and mbratio2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the MBratio data with this post. see below&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 Aug 2012 05:24:03 GMT</pubDate>
    <dc:creator>redrover99</dc:creator>
    <dc:date>2012-08-05T05:24:03Z</dc:date>
    <item>
      <title>FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83245#M23884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To this post I have attached two databases.&lt;/P&gt;&lt;P&gt;Database1: Contains the event firm information, involving the headings: Permno1, Dclrdt, marketcap1, Year1 and industry1. There are approximately 10869 event firm observations in database 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database2: Contains the NON-Event firm information, involving the headings: Permno2, Marketcap2, year2 and industry2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each of the event firm observations in database1 (DB1) I need to match with a non-event firm observation in database2 (DB2) to create a database 3 (DB3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to match the observations on the basis of:&lt;/P&gt;&lt;P&gt;-Industry (must be the same number, between 1-7)&lt;/P&gt;&lt;P&gt;-Year (must be the same year)&lt;/P&gt;&lt;P&gt;-Size (no limits, just the closet match available for the given industry and year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately my objective to achieve:&lt;/P&gt;&lt;P&gt;Database 3: Matched database. This contains 10869 event firms and its counterpart, the matched non event firm.&amp;nbsp; DB3 holds the following headings: Permno1, Dclrdt, marketcap1, Year1 , industry1, Permno2, Marketcap2, year2 and industry2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seek help on this highly complex command, data is attached below.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 10:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83245#M23884</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-03T10:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83246#M23885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Search for propensity score matching algorithms.&amp;nbsp; &lt;/P&gt;&lt;P&gt;In this case within a particular combination of Industry and Year the value of SIZE can be treated as your propensity score.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 15:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83246#M23885</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-08-03T15:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83247#M23886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can the same NON-event firm be matched to many event firm for a given year, and vice-versa? Or are you looking for one-to-one matches?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 16:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83247#M23886</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-03T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83248#M23887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said:&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Size (no limits, just the closet match available for the given industry and &lt;SPAN style="text-decoration: underline;"&gt;size&lt;/SPAN&gt;)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you mean "given industry and &lt;SPAN style="text-decoration: underline;"&gt;year"&lt;/SPAN&gt;?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you want, for each record in DB 1, a single record from DB2 with the "closest match" in size, given it has the same industry and year.&amp;nbsp; I.e. this is NOT a random selection, am I correct?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As stated, that would be easy (even the possibility of tied SIZE in DB2 could be easily addressed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The real problem is whether you are willing to have the same DB2 record ending up being found as the closest to multiple DB1 records (i.e. "sampling with replacement").&amp;nbsp; I doubt you would want that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you don't want that, my question to you is what rule do you want to use when a given DB2 record is the closest to multiple DB1 recs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And before you say assign the DB2 record to the DB1 it is closest to, and then go get matches for the other DB1 recs, consider this scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;db1rec&amp;nbsp; db1size&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; db2rec&amp;nbsp; db2size&lt;BR /&gt;&amp;nbsp; 1a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 51&lt;BR /&gt;&amp;nbsp; 1b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 252&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2a is closest to both, but if you assign 2a to 1b (it's closer to 1b), then that leaves 2b (252) assigned to 1a (100) - probably not what you would want.&amp;nbsp;&amp;nbsp; OTOH, introducing some criterion like minimizing the total of all size differences (in a given industry/year group) would be, to me, a difficult programming task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 17:25:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83248#M23887</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2012-08-03T17:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83249#M23888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"The same NON-event firm be matched to many event firm for a given year" yes this should be fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can we give both codes a go?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One code for where the same non-event firm can be matched, and another code where only one-to-one matches are permitted??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mkeintz:You are right, my mistake it should be "size (no limits, just the closet match available for the given industry and year)". This is not random selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I matched 1a to 2b this is a difference of 152 and if 1b with 2a this is a difference of 149. So, I would like to match 1a with 2a (difference of 49), and 1b with 2b (Difference of 52). Though I understand what you are trying to say, perhaps if we can impose a preference to those closest matches holding the same first digit. ie: 200 with 252. The preference is to be exercised only when two non-event observations are competing for selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With my SAS capabilities this matching process is proving a difficult command to conquer. Help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 00:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83249#M23888</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-04T00:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83250#M23889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the closest matches, allowing duplicates :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data DB1S;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set DB1; source = _n_;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table db as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select source, industry1 as industry, year1 as year, permno1 as permno, dclrdt, marketcap1 as size&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from DB1S&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;union all&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select 0, industry2, year2, permno2, 0, marketcap2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from DB2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;order by industry, year, size, dclrdt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data up;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set db; by industry year;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;retain p2 s2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if first.year then call missing(p2, s2);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if source &amp;gt; 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; match = coalesce(abs(size - s2), 999999);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;else do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p2 = permno; s2 = size;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sort data=db; by industry year descending size descending dclrdt; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data down;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set db; by industry year;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;retain p2 s2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if first.year then call missing(p2, s2);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if source &amp;gt; 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; match = coalesce(abs(size - s2), 999999);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;else do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p2 = permno; s2 = size;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table DB3 as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select U.industry, U.year, U.permno as permno1, U.dclrdt, U.size as marketcap1,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case when U.match &amp;lt; D.match then U.p2 else D.p2 end as permno2,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case when U.match &amp;lt; D.match then U.s2 else D.s2 end as marketcap2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from up as U inner join down as D on U.source = D.source&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;order by U.source;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;drop table DB1S, db, up, down;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If duplicates are not allowed, the problem becomes a much harder optimization challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 18:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83250#M23889</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-04T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83251#M23890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, allowing duplicates is fine. I like the database 3 I am receiving, however I wonder is it possible to tweak the code to add one more restriction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So matching the data on 4 levels of criterion:&lt;/P&gt;&lt;P&gt;-Industry (must be the same number)&lt;/P&gt;&lt;P&gt;-Year (must be the same year)&lt;/P&gt;&lt;P&gt;-Size ( the closet match available )&lt;/P&gt;&lt;P&gt;-BM ratio ( the closet match available given matching industry, matching year and closet size)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By adding one more restriction this reduces the number of observations in the event firm DB1 to 5085. Still looking to match each observation with a non event firm db2 thankfully this database is still rather large about 1mill observations for SAS to select from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the final product would be much the same:&lt;/P&gt;&lt;P&gt;Database 3: Matched database. This contains 5085 event firms and its counterpart, the matched non event firm.&amp;nbsp; DB3 holds the following headings: Permno1, Dclrdt, marketcap1, Year1 , industry1, mbratio1, Permno2, Marketcap2, year2, industry2 and mbratio2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the MBratio data with this post. see below&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 05:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83251#M23890</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-05T05:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83252#M23891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The algorithm implemented in the code is based on sorting. Sorting brings matching sizes in consecutive order. Unless there is a way to combine size and MBratio to produce a unique order, this simple algorithm cannot be adapted to more than one matching criteria. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 12:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83252#M23891</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-05T12:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83253#M23892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, what if I multiplied size and MB ratio in each database, to obtain a "size_MBratio" variable? Then matched DB1 and DB2 on the "size_MBratio"? Could the code provided then potentially match on size and BM ratio?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To the readers of this post, I am very eager to match on 4 levels of criterion, if you have this programming capabilities to help us out, please do! This requires high level programming skills.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 12:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83253#M23892</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-05T12:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83254#M23893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried matching with the product of marketcap and bmratio, this is the code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Add a unique sequence number to DB1 */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data DB1S;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set DB1; source = _n_;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Concatenate DB1 and DB2, use the variable SOURCE to distinguish the &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;source of each observation, sort the resulting dataset by size=marketcap*bmratio */ &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table db as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select source, industry1 as industry, year1 as year, permno1 as permno, dclrdt, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; marketcap1 as marketcap, bmratio1 as bmratio, marketcap1*bmratio1 as size&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from DB1S&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;union all&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select 0, industry2, year2, permno2, 0, marketcap2, bmratio2, marketcap2*bmratio2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from DB2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;order by industry, year, size, dclrdt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Scan the sorted data and associate the last observation met from DB2 to each &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;observation from DB1 */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data up;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set db; by industry year;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;retain p2 m2 b2 s2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if first.year then call missing(p2, m2, b2, s2);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if source &amp;gt; 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; match = coalesce(abs(size - s2), 999999);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;else do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; p2 = permno; m2=marketcap; b2=bmratio; s2 = size;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* reverse the sort order within each industry-year */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sort data=db; by industry year descending size descending dclrdt; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Scan the sorted data and associate the last observation met from DB2 to each &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;observation from DB1 */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data down;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set db; by industry year;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;retain p2 m2 b2 s2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if first.year then call missing(p2, m2, b2, s2);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;if source &amp;gt; 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; match = coalesce(abs(size - s2), 999999);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;else do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; p2 = permno; m2=marketcap; b2=bmratio; s2 = size;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Merge datasets UP and DOWN, keeping the closest match between the size immediately&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;before and the size immediately after each DB1 observation. Reestablish the original &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;DB1 order */ &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table DB4 as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.industry label="Industry", &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.year label="Year", &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.permno as permno1 label="PermNo1", &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.dclrdt, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; case when U.match &amp;lt; D.match then U.p2 else D.p2 end as permno2 label="PermNo2",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.marketcap as marketcap1 label="MarketCap1", &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; case when U.match &amp;lt; D.match then U.m2 else D.m2 end as marketcap2 label="MarketCap2",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; U.bmratio as bmratio1 label="BMratio1",&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; case when U.match &amp;lt; D.match then U.b2 else D.b2 end as bmratio2 label="BMratio2"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from up as U inner join down as D on U.source = D.source&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;order by U.source;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;drop table DB1S, db, up, down;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compared to the original results (BD3), I don't find these results very satisfactory. I will give it a shot with the brute force approach, using some kind of euclidian distance as matching criteria. Contrary to first impression, it might be manageable within industry and year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 19:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83254#M23893</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-05T19:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83255#M23894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll get decent results using brute force (takes about 15 minutes to run on my modest machine) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Add a unique sequence number to DB1 */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data DB1S;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set DB1; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;source = _n_;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Considering the distributions of marketcap1 and BMratio1, combine the&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;difference in log10(marketcap) and twice the difference in BMratio&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;as the components of distance between DB1 and DB2 observations.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Find the pairs with the lowest distances.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Takes about 15 min to run on a 3 GHz Intel processor with 2Gb memory */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table matches as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select db1s.*, db2.*, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log10(marketcap1/marketcap2)**2 + 4*(BMratio1-BMratio2)**2 as dist&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from db1s inner join db2 on industry1=industry2 and year1=year2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;group by source&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;having dist=min(dist);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Remove duplicates originating from duplicates in DB2 */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sort data=matches noduprecs out=DB5; by source; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 20:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83255#M23894</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-05T20:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING MATCHED COUNTERPARTS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83256#M23895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PGStats you are a commendable mathematician! Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 00:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FINDING-MATCHED-COUNTERPARTS/m-p/83256#M23895</guid>
      <dc:creator>redrover99</dc:creator>
      <dc:date>2012-08-06T00:10:53Z</dc:date>
    </item>
  </channel>
</rss>

