<?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 the good proc compare options in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-the-good-proc-compare-options/m-p/870236#M42750</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to copy some datsets from path1 to path1/backup.&amp;nbsp; Then&amp;nbsp; I need to copy some datasets from path2 to path1.&lt;/P&gt;
&lt;P&gt;But before doing that, I would like to compare the variables (only the variables not their values, and variables atttributes) in each dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base=FTEDATA.Agent&amp;nbsp; compare=FTESGOT. Agent novalues;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But It&amp;nbsp; still see values comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what's the best options ?&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2023 19:36:26 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2023-04-17T19:36:26Z</dc:date>
    <item>
      <title>using the good proc compare options</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-the-good-proc-compare-options/m-p/870236#M42750</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to copy some datsets from path1 to path1/backup.&amp;nbsp; Then&amp;nbsp; I need to copy some datasets from path2 to path1.&lt;/P&gt;
&lt;P&gt;But before doing that, I would like to compare the variables (only the variables not their values, and variables atttributes) in each dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc compare base=FTEDATA.Agent&amp;nbsp; compare=FTESGOT. Agent novalues;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But It&amp;nbsp; still see values comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what's the best options ?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 19:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-the-good-proc-compare-options/m-p/870236#M42750</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2023-04-17T19:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: using the good proc compare options</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-the-good-proc-compare-options/m-p/870245#M42751</link>
      <description>&lt;P&gt;You can set obs=0 for both datasets, i.e.:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc compare base=FTEDATA.Agent (obs=0)  compare=FTESGOT.Agent (obs=0) listvars;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Compare will throw a warning, but it still compares the metadata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option is to use PROC CONTENTS to output variable metadata as data, and then you can use PROC COMPARE on the datasets. e.g.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  set sashelp.class (drop=weight);
run ;

proc contents data=sashelp.class out=class_vars (keep=name type length label /* etc */ );
run ;

proc contents data=have out=have_vars (keep=name type length label /* etc */ ) ;
run ;

proc compare base=class_vars compare=have_vars error listobs;
 id name ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2023 20:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-the-good-proc-compare-options/m-p/870245#M42751</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-04-17T20:08:57Z</dc:date>
    </item>
  </channel>
</rss>

