<?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: automatically output &amp;quot;Proc compare&amp;quot; result? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409571#M12528</link>
    <description>&lt;P&gt;When you say "get the "table is different" log file out of SAS EG, then give to the client this message.", it's a little unclear. Exactly how would you like the message conveyed to the client? Then we can figure out how to get SAS to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2017 18:01:51 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2017-11-01T18:01:51Z</dc:date>
    <item>
      <title>automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409493#M12519</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a question about automatically outputting the "Proc Compare" result to clients. What I want is to get a message when the tables being compared are different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Anyone has any suggestion to do this? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right now I came up with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 1) get error message if the tables are different. I can get the error message in the log file if using syntax like below:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;COMPARE&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BASE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=count_test1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;COMPARE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=count_test2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ERROR&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;NOPRINT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: Values of the following 1 variables compare unequal: test&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: The data sets WORK.COUNT_TEST1 and WORK.COUNT_TEST2 contain unequal values.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 2) output the error message or log file to clients. I don't know how to proceed on this step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Jade&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 15:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409493#M12519</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-01T15:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409497#M12520</link>
      <description>&lt;P&gt;Please explain in detail the environment you are using. With Enterprise Guide it is impossible to display message boxes, same for SAS Studio.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 15:14:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409497#M12520</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-11-01T15:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409499#M12521</link>
      <description>&lt;P&gt;In what sense sorry?&amp;nbsp; The reason I ask is that unless that proc compare is run as part of an automated import system, I don't see how it can be automatically returned to the client.&amp;nbsp; If you have an automated import system, i.e. client sends a file to a web portal and then at your end code runs, then you could either return a message via the portal or send them an email.&amp;nbsp; However if its you running it then you need to send the information back.&amp;nbsp; Lack of information for anything specific.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 15:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409499#M12521</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-01T15:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409516#M12522</link>
      <description>&lt;P&gt;I am using Enterprise Guide on SAS server. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 15:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409516#M12522</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-01T15:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409518#M12523</link>
      <description>&lt;P&gt;I am using SAS EG on SAS server.&lt;/P&gt;&lt;P&gt;What I am trying to say is get the "table is different" log file out of SAS EG, then give to the client this message.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 15:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409518#M12523</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-01T15:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409533#M12524</link>
      <description>&lt;P&gt;Can you not just email the log out?&amp;nbsp; Proc print the log to&amp;nbsp; text file, then do a filename email and datastep, this should help:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not that familiar with EG, maybe there is already a task to do email from step?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 16:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409533#M12524</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-01T16:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409542#M12526</link>
      <description>&lt;P&gt;I don't have access to an EG right now, but there should be a task to send the log as mails, like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;said. proc compare sets a macro variable to something &amp;gt; 0 if the datasets are not equal, you just have to define a condition for the mail task, checking the variable.&amp;nbsp;The following document describes the macro variable created by proc compare:&amp;nbsp;https://&lt;SPAN&gt;support.sas.com/resources/papers/proceedings12/063-2012.pdf&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 16:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409542#M12526</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-11-01T16:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409571#M12528</link>
      <description>&lt;P&gt;When you say "get the "table is different" log file out of SAS EG, then give to the client this message.", it's a little unclear. Exactly how would you like the message conveyed to the client? Then we can figure out how to get SAS to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 18:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409571#M12528</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-11-01T18:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: automatically output "Proc compare" result?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409646#M12532</link>
      <description>&lt;P&gt;You can use the ODS OUTPUT data sets from COMPARE and parse the content.&amp;nbsp; This circumvents parsing the logs. &amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output comparesummary=compsummary;&lt;/P&gt;&lt;P&gt;proc compare base=libref1.dsname compare=libref2.dsname; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data compcheck;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set compsummary;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where batch like '%Number of Observations with Some Compared Variables Unequal:%';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; unequal=strip(compress(scan(batch,-1,":"),"."));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods output close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can clean up the code to meet your needs or parse out what you want from compsummary. &amp;nbsp;&lt;/P&gt;&lt;P&gt;In the SAS Documentation you will see four other data sets that you can create from COMPARE.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 21:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/automatically-output-quot-Proc-compare-quot-result/m-p/409646#M12532</guid>
      <dc:creator>PrimeMeridian</dc:creator>
      <dc:date>2017-11-01T21:12:49Z</dc:date>
    </item>
  </channel>
</rss>

