<?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 Proc Compare output - Only not found observation from any dataset (base or compare) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266732#M52632</link>
    <description>&lt;P&gt;Hi, Is there any way to output all observations that are no found in any of comparision dataset (base or compare ) &amp;nbsp;by proc compare?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base = test compare = test1 listall ;&lt;/P&gt;
&lt;P&gt;id sales_id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What should be "out" option to get not found observations from any dataset ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2016 14:50:11 GMT</pubDate>
    <dc:creator>nkm123</dc:creator>
    <dc:date>2016-04-27T14:50:11Z</dc:date>
    <item>
      <title>Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266732#M52632</link>
      <description>&lt;P&gt;Hi, Is there any way to output all observations that are no found in any of comparision dataset (base or compare ) &amp;nbsp;by proc compare?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base = test compare = test1 listall ;&lt;/P&gt;
&lt;P&gt;id sales_id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What should be "out" option to get not found observations from any dataset ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266732#M52632</guid>
      <dc:creator>nkm123</dc:creator>
      <dc:date>2016-04-27T14:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266739#M52636</link>
      <description>&lt;P&gt;You should provide a few example rows of data from two sets and the desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yout may be looking for LISTBASE or LISTBASEOBS but I'm not quite sure of your intent.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 15:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266739#M52636</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-27T15:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266770#M52647</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please see example. as only store id = 3 is common I need 1,2, from test dataset and 4,5 from test1 dataset into output. I can do merge/sql but is there any ay doing this by proc compare.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;								  data test;
								  store_id =1;type='P';output;
								  store_id =2;type='Q';output;
								  store_id =3;type='R';output;
								  run;
								  data test1;
								  store_id =3;type='R';output;
								  store_id =4;type='S';output;
								  store_id =5;type='T';output;
								  run;
									
								  data want;
								  store_id =1;type='P';output;
								  store_id =2;type='Q';output;
								  store_id =4;type='S';output;
								  store_id =5;type='T';output;
								  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266770#M52647</guid>
      <dc:creator>nkm123</dc:creator>
      <dc:date>2016-04-27T17:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266790#M52650</link>
      <description>&lt;P&gt;For what you are attempting you would be better off with an OUTER JOIN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc sql;
   create table want as
   (select * from test
      except
      select * from test1)
   union
   (select * from test1
      except
      select * from test)
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266790#M52650</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-27T17:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266821#M52666</link>
      <description>&lt;P&gt;Is there any way to output not found observation in any dataset by using proc compare ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 19:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266821#M52666</guid>
      <dc:creator>nkm123</dc:creator>
      <dc:date>2016-04-27T19:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266870#M52695</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc compare will not provide an output data set as specified in your example.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 21:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266870#M52695</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-27T21:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Compare output - Only not found observation from any dataset (base or compare)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266871#M52696</link>
      <description>&lt;P&gt;Not just by using PROC COMPARE alone. You could use the OUTBASE, OUTCOMP and OUTDIF options and then process these in a following DATA step to keep just the&amp;nbsp;&lt;SPAN&gt;OUTBASE and&amp;nbsp;OUTCOMP records without a corresponding&amp;nbsp;OUTDIF record (OUTDIF only records matches), but this won't cope with duplicate values of your ID variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;'s solution will give you what you want in one process that will also cope with duplicate ID values.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 21:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Compare-output-Only-not-found-observation-from-any-dataset/m-p/266871#M52696</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-04-27T21:37:22Z</dc:date>
    </item>
  </channel>
</rss>

