<?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 Distance between two data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310655#M67028</link>
    <description>&lt;P&gt;Let's say I have two datasets. One has 3 variables name 1,2,3 and the other dataset has 6 variables named 1,2,3,4,5,6. Is there a quick way to compare both datasets and determine the variables that are different? In our example it would be 4,5,6.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2016 13:45:43 GMT</pubDate>
    <dc:creator>hwangnyc</dc:creator>
    <dc:date>2016-11-10T13:45:43Z</dc:date>
    <item>
      <title>Distance between two data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310655#M67028</link>
      <description>&lt;P&gt;Let's say I have two datasets. One has 3 variables name 1,2,3 and the other dataset has 6 variables named 1,2,3,4,5,6. Is there a quick way to compare both datasets and determine the variables that are different? In our example it would be 4,5,6.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310655#M67028</guid>
      <dc:creator>hwangnyc</dc:creator>
      <dc:date>2016-11-10T13:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between two data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310660#M67029</link>
      <description>Proc compare?</description>
      <pubDate>Thu, 10 Nov 2016 13:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310660#M67029</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-11-10T13:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between two data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310664#M67030</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
   input one two three;
   datalines;
   1 2 3
;

data other;
   input one two three four five six;
   datalines;
   1 2 3 4 5 6
;

proc compare base = one compare =  other NOVALUES LISTVAR;;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5748i4BB405E41816AC06/image-size/medium?v=v2&amp;amp;px=-1" border="0" alt="COMPARE.PNG" title="COMPARE.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310664#M67030</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2016-11-10T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between two data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310683#M67034</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro get_dif;
   %let op=%sysfunc(open(have));
   %let allvars=;
   %do i=1 %to  %sysfunc(attrn(&amp;amp;op,nvars));
      %let allvars=&amp;amp;allvars %sysfunc(varname(&amp;amp;op,%eval(&amp;amp;i)));
   %end;

%let op_C=%sysfunc(open(sashelp.class));
   %let not_common=;
   %do i=1 %to %sysfunc(attrn(&amp;amp;op_C,nvars));
      %let var_c=%sysfunc(varname(&amp;amp;op_C,%eval(&amp;amp;i)));
	  %if %sysfunc(find(&amp;amp;allvars,&amp;amp;var_c)) eq 0 %then
			%do;%let not_common=&amp;amp;not_common &amp;amp;var_c;%end;
   %end;
   %put %nrstr(&amp;amp;not_common)=&amp;amp;not_common;
%mend get_dif;
%get_dif&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Nov 2016 14:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distance-between-two-data-set/m-p/310683#M67034</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-11-10T14:48:55Z</dc:date>
    </item>
  </channel>
</rss>

