<?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: Proc compare - controlling output with multiple runs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284350#M58034</link>
    <description>&lt;P&gt;I'm not quite understanding what you are looking for.&amp;nbsp; Are you saying you want to run PROC COMPARE, and have it produce NO output if the two datasets match?&amp;nbsp; For that, you might consider a macro solution that is something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Turn off wrting of output (with proc printto/ ODS Close etc).&lt;/P&gt;
&lt;P&gt;2. Run PROC COMPARE&lt;/P&gt;
&lt;P&gt;3. Check the value of PROC COMPARE macro variable holding return code, SYSINFO.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp;If SYSINFO is non-zero (so datasets did not match), turn on writing of the output and run PROC COMPARE again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a lot on information in SYSINFO that allows you to identify what differences were encountered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 14:38:39 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2016-07-14T14:38:39Z</dc:date>
    <item>
      <title>Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284314#M58019</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can some one help me with below issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I comparing the around 100 datasets in the two libraries by using the Proc compare. 98% of datasets have similar attributes and are identical. when i am running proc compare by having 100 datasets in the 'Do LOOP'. I am getting huge report as there 98% of datasets have been compared...&lt;STRONG&gt;"I would like to see in the output only thoose datasets which have unequal values&lt;/STRONG&gt;."I have used the option&amp;nbsp;&lt;SPAN class="strong"&gt;OUTNOEQUAL but it is meant for outputting to Datasets....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="strong"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="strong"&gt;Rakesh&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 13:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284314#M58019</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2016-07-14T13:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS QUERY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284322#M58022</link>
      <description>&lt;P&gt;Proc compare is ok. &amp;nbsp;Personally if I was doing any major comparisons like that I wouold write the code myself to exactly output the results I want. &amp;nbsp;If you use SQL you can use the except function:&lt;/P&gt;
&lt;PRE&gt;proc sql; 
  create table LEFT as select * from BASE except select * from COMP;
  create table RIGHT as select * from COMP except select * from BASE;
quit;&lt;/PRE&gt;
&lt;P&gt;That will give you the differences betwen the datasets both ways. &amp;nbsp;You can advance that in many ways of course using merging and such like.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 13:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284322#M58022</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-14T13:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284330#M58026</link>
      <description>&lt;P&gt;You mention that you create a data set with OUTNOEQUAL.&amp;nbsp; Is the contents of that data set what&amp;nbsp; you would like to see (without having to view the rest of the output)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's easy enough to print a SAS data set.&amp;nbsp; PROC PRINT would do it (perhaps with a VAR statement to control which variables print).&amp;nbsp; There are two further tasks required.&amp;nbsp; First, put a title on the PROC PRINT so you can tell which data sets are being compared.&amp;nbsp; Second, use PROC PRINTTO to move the output to another file that you specify:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc printto print='some other file';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc print;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc printto;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final PROC PRINTTO makes sure that the rest of the output that you don't want to see goes to the .lst file.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 13:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284330#M58026</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-14T13:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284341#M58030</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to create a dataset and use the proc print option but&amp;nbsp;would like to know if we have an option to suppress the output for only Unequal values. in that way the default proc compare listing remains intact.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 14:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284341#M58030</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2016-07-14T14:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284343#M58031</link>
      <description>&lt;P&gt;There are a ton of options available on the PROC COMPARE statement.&amp;nbsp; You may need to play with them to figure out which does what you want.&amp;nbsp; A couple of possibilities&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BRIEF&lt;/P&gt;
&lt;P&gt;NOVALUES&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look through the documentation and see what looks promising.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#n0c1y14wyd3u7yn1dmfcpaejllsn.htm#n030lp8d05gjkhn1sa6cb4c1f54q" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#n0c1y14wyd3u7yn1dmfcpaejllsn.htm#n030lp8d05gjkhn1sa6cb4c1f54q&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 14:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284343#M58031</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-14T14:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284350#M58034</link>
      <description>&lt;P&gt;I'm not quite understanding what you are looking for.&amp;nbsp; Are you saying you want to run PROC COMPARE, and have it produce NO output if the two datasets match?&amp;nbsp; For that, you might consider a macro solution that is something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Turn off wrting of output (with proc printto/ ODS Close etc).&lt;/P&gt;
&lt;P&gt;2. Run PROC COMPARE&lt;/P&gt;
&lt;P&gt;3. Check the value of PROC COMPARE macro variable holding return code, SYSINFO.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp;If SYSINFO is non-zero (so datasets did not match), turn on writing of the output and run PROC COMPARE again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a lot on information in SYSINFO that allows you to identify what differences were encountered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 14:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284350#M58034</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-07-14T14:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc compare - controlling output with multiple runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284367#M58041</link>
      <description>&lt;P&gt;Perfect sir...Thank you..&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 15:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-compare-controlling-output-with-multiple-runs/m-p/284367#M58041</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2016-07-14T15:18:29Z</dc:date>
    </item>
  </channel>
</rss>

