<?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: Compare two datasets and find the non matching records in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607247#M176466</link>
    <description>&lt;P&gt;I'm unable to understand the data in the Output dataset COMP.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 09:52:42 GMT</pubDate>
    <dc:creator>David_Billa</dc:creator>
    <dc:date>2019-11-26T09:52:42Z</dc:date>
    <item>
      <title>Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607214#M176448</link>
      <description>&lt;P&gt;I would like to compare two datasets and find the non matching records. In below example, both the datasets has same Observation and I believe only order of the records should be differ in both the datasets. When I run the following code, it says 4096 records are differ in both the datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know whether proc compare will consider the order of the record also to be identical and I wanted to the best method to compare two datasets irrespective of order of the record. If there is a&amp;nbsp;difference, I want to see the records which differs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc compare base=test compare=test1;
run;

%put &amp;amp;sysinfo.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;26         proc compare base=test compare=test1;
27         run;

NOTE: There were 5985917 observations read from the data set WORK.TEST.
NOTE: There were 5985917 observations read from the data set WORK.TEST1.
NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format.
NOTE: PROCEDURE COMPARE used (Total process time):
      real time           28.39 seconds
      cpu time            27.54 seconds
      

28         
29         %put &amp;amp;sysinfo.;
SYMBOLGEN:  Macro variable SYSINFO resolves to 4096&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 07:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607214#M176448</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2019-11-26T07:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607217#M176450</link>
      <description>&lt;P&gt;Yes, PROC COMPARE considers observation order. Sort your two data sets by the same variable and compare again. In my book, PROC COMPARE is still the best tool for the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this small example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input var1 var2;
datalines;
1 2
3 4
;

data b;
input var1 var2;
datalines;
3 4
1 2
;

proc compare base=a comp=b;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 07:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607217#M176450</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-26T07:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607228#M176455</link>
      <description>OK, how and where can I difference records in the output?&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Nov 2019 08:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607228#M176455</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2019-11-26T08:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607233#M176457</link>
      <description>&lt;P&gt;How about the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input ID var1 var2;
datalines;
001 1 2
002 2 2
003 1 2
004 1 2
006 1 3
;
run;

data b;
input ID var1 var2;
datalines;
001 1 2
002 1 2
003 1 2
004 1 3
007 2 2
;
run;

proc compare base=a comp=b noprint OUTNOEQUAL OUT=COMP ;
by ID;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 08:56:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607233#M176457</guid>
      <dc:creator>HIRO2020</dc:creator>
      <dc:date>2019-11-26T08:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607247#M176466</link>
      <description>&lt;P&gt;I'm unable to understand the data in the Output dataset COMP.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 09:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607247#M176466</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2019-11-26T09:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two datasets and find the non matching records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607258#M176472</link>
      <description>&lt;P&gt;A description of the OUT= dataset is found &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1jbbrf1tztya8n1tju77t35dej9.htm&amp;amp;locale=en#p0z9hrqb72tzq3n1wz8zyvi52w6s" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 10:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-two-datasets-and-find-the-non-matching-records/m-p/607258#M176472</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-26T10:32:45Z</dc:date>
    </item>
  </channel>
</rss>

