<?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 How to compare data sets in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54152#M14989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make a dataset solution that does a cartesian product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set one;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do _p=1 to _nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set two point=_p nobs=_nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Nov 2011 03:51:16 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-11-27T03:51:16Z</dc:date>
    <item>
      <title>How to compare data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54149#M14986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Am having trouble getting each row in one data set to compare/join with all the rows in a second data set,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;as in the attached file. Have tried many many variations but still cannot get the desired result. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Running SAS 9.1.3 Service Pack 4 in Redhat Linux.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&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; Allan.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 12:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54149#M14986</guid>
      <dc:creator>Ballswool</dc:creator>
      <dc:date>2011-11-25T12:04:14Z</dc:date>
    </item>
    <item>
      <title>How to compare data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54150#M14987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since all you appear to want is the cartesian product of the two files, I would think that using proc sql would be the easiest way to get it.&amp;nbsp; E.g.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from file1,file2&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 15:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54150#M14987</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-25T15:48:04Z</dc:date>
    </item>
    <item>
      <title>How to compare data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54151#M14988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; art,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for the reply, I can see how it would be possible with sql, though a bit complex. &lt;/P&gt;&lt;P&gt;Would still prefer to be able to compare each row of file1 with every row on file2. &lt;/P&gt;&lt;P&gt;The data would be from a survey on a 50 x 50 meter grid where file1 would contain two numerical &lt;/P&gt;&lt;P&gt;values x1 y1 where one unit represents 50m with the origin at say&amp;nbsp; 0 0. &lt;/P&gt;&lt;P&gt;file2 would contain a grid&amp;nbsp; x2 y2 with an origin of 25 by 25.&lt;/P&gt;&lt;P&gt;Rows in file1 represent points that cannot be accessed and need to be moved by a maximum radius&lt;/P&gt;&lt;P&gt;to a point on the second grid such that points from file1 will be allocated to points in file2 only once&lt;/P&gt;&lt;P&gt;and points in file2 will only be matched with a point from file1 once.&lt;/P&gt;&lt;P&gt;Both files could be in the thousands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&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; Allan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 09:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54151#M14988</guid>
      <dc:creator>Ballswool</dc:creator>
      <dc:date>2011-11-26T09:36:30Z</dc:date>
    </item>
    <item>
      <title>How to compare data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54152#M14989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make a dataset solution that does a cartesian product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set one;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do _p=1 to _nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set two point=_p nobs=_nobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2011 03:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-compare-data-sets/m-p/54152#M14989</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-27T03:51:16Z</dc:date>
    </item>
  </channel>
</rss>

