<?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: Want to send email with full first error message when my SAS job failed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Want-to-send-email-with-full-first-error-message-when-my-SAS-job/m-p/529688#M144766</link>
    <description>&lt;P&gt;Just sending ERROR messages without the surrounding code is useless (you can see how useless this is in many threads here with suboptimal questions). Send the whole log instead, or even better, send a link to the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a framework where every individual batch job run creates a separate log file; a listing of job runs is kept, with links to the logs (they can be accessed by the web server); if the wrapper script (sasbatch) detects a non-zero return code from a SAS job, a notification is triggered.&lt;/P&gt;
&lt;P&gt;When I receive a notification, I call up the list of job runs, click on the failed job, and get the whole log.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 14:15:54 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-01-24T14:15:54Z</dc:date>
    <item>
      <title>Want to send email with full first error message when my SAS job failed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-send-email-with-full-first-error-message-when-my-SAS-job/m-p/529652#M144754</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some one please help me to get a correct code .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to send email with first error message from log if my job get failed , if job success then no email required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried multiple ways but facing different - different issues.some times sends last error message, some time get first line of error but not taking second line if error string is more than one line and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone have clean code please share .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 11:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-send-email-with-full-first-error-message-when-my-SAS-job/m-p/529652#M144754</guid>
      <dc:creator>AshwaniGupta</dc:creator>
      <dc:date>2019-01-24T11:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Want to send email with full first error message when my SAS job failed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Want-to-send-email-with-full-first-error-message-when-my-SAS-job/m-p/529688#M144766</link>
      <description>&lt;P&gt;Just sending ERROR messages without the surrounding code is useless (you can see how useless this is in many threads here with suboptimal questions). Send the whole log instead, or even better, send a link to the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a framework where every individual batch job run creates a separate log file; a listing of job runs is kept, with links to the logs (they can be accessed by the web server); if the wrapper script (sasbatch) detects a non-zero return code from a SAS job, a notification is triggered.&lt;/P&gt;
&lt;P&gt;When I receive a notification, I call up the list of job runs, click on the failed job, and get the whole log.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 14:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Want-to-send-email-with-full-first-error-message-when-my-SAS-job/m-p/529688#M144766</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-01-24T14:15:54Z</dc:date>
    </item>
  </channel>
</rss>

