<?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 using proc compare in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128652#M35137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using proc compare for the first time and i'm wondering if there is a possibility to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 datasets : H and F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both datasets i have 3 variables to match on so I putted them in my id statement, i have several variables to compare then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;H:&lt;/P&gt;&lt;P&gt;idA idB idC varA varB varC&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F&lt;/P&gt;&lt;P&gt;idA idB idC varA varB varC&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc compare base=H compare=F out=test OUTALL OUTDIF OUTPERCENT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id idA idB idC&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var varA varB varC;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the 2 records in F are almost identical. I want the compare to compare the first record from H with all records from F. Is the proc compare the right proc to use or do you have other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2012 10:00:55 GMT</pubDate>
    <dc:creator>Filipvdr</dc:creator>
    <dc:date>2012-09-24T10:00:55Z</dc:date>
    <item>
      <title>using proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128652#M35137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using proc compare for the first time and i'm wondering if there is a possibility to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 datasets : H and F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both datasets i have 3 variables to match on so I putted them in my id statement, i have several variables to compare then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;H:&lt;/P&gt;&lt;P&gt;idA idB idC varA varB varC&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F&lt;/P&gt;&lt;P&gt;idA idB idC varA varB varC&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc compare base=H compare=F out=test OUTALL OUTDIF OUTPERCENT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id idA idB idC&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var varA varB varC;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the 2 records in F are almost identical. I want the compare to compare the first record from H with all records from F. Is the proc compare the right proc to use or do you have other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 10:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128652#M35137</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2012-09-24T10:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: using proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128653#M35138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to compare the first (or any subset of recrods) from H with F you probably want to use Proc SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What type of comparison(s) do you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 15:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128653#M35138</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-09-24T15:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: using proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128654#M35139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to check of the value of varA in H corresponds/matches to varA in F&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;&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; varB in H corresponds/matches to varB in F ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 15:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128654#M35139</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2012-09-24T15:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: using proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128655#M35140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, PROC COMPARE is the wrong tool for the job.&amp;nbsp; It will compare each record from H with only a single record from F. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As was suggested, PROC SQL is probably the right tool for the job.&amp;nbsp; But you would have to specify more of what you are hoping to achieve to get more help.&amp;nbsp; For example ...&amp;nbsp; Are your data sets small enough to sort?&amp;nbsp; Are duplicate records possible?&amp;nbsp; Do you want to find every possible match if there is more than one?&amp;nbsp; Do you want to identify which records match and which ones don't?&amp;nbsp; Do you care about mismatches that appear in H but not in F, or do you also care about mismatches that appear in F but not in H?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matches/mismatches are a common programming problem.&amp;nbsp; If you can describe what you are hoping to achieve, you will get plenty of feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 16:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-proc-compare/m-p/128655#M35140</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-09-24T16:01:08Z</dc:date>
    </item>
  </channel>
</rss>

