<?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 data step execution aborted while sending the emails from sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-step-execution-aborted-while-sending-the-emails-from-sas/m-p/162817#M263471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mails data set looks as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="101" style="border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:ghi@some.com"&gt;ghi@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:jkl@some.com"&gt;jkl@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;consider &lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt; is a wrong email&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of now my code looks as follows;;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STEP=1: Sorting the data set.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;PROC SORT DATA=mails;&lt;/P&gt;&lt;P&gt;BY mail_id;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STEP=2 : Sending mails for every three hundred users after holding the triggering mails process for 2 mnts..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro send_email;&lt;/P&gt;&lt;P&gt;filename hm_mail email lrecl=32000 type='text/html';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; set mails END=EOF;&lt;BR /&gt; by mail_id;&lt;BR /&gt; file hm_mail;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; retain numofusers 0;&lt;/P&gt;&lt;P&gt;if first.mail_id then do;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numofusers=numofusers+1;&lt;BR /&gt;&amp;nbsp; If mod(numofusers,300) = 0 then Timer=Sleep(120,1);&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; put '!EM_TO!' mail_id;&lt;BR /&gt;&amp;nbsp; put '!EM_SUBJECT!' 'Test Plans have been created.';&lt;BR /&gt;&amp;nbsp; put 'The following test plans have been created with you as a tester.';&lt;BR /&gt;&amp;nbsp; put '&amp;lt;br&amp;gt;';&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;id_link = '&amp;lt;a href="' ||left(strip(id)) || '"&amp;gt;' || left(strip(id)) || '&amp;lt;/a&amp;gt;' ;&lt;BR /&gt; put '&amp;lt;br&amp;gt;';&lt;BR /&gt; put id_link;&lt;BR /&gt; put '&amp;lt;br&amp;gt;';&lt;/P&gt;&lt;P&gt;if last.mail_id then do;&lt;BR /&gt;&amp;nbsp; put '&amp;lt;br&amp;gt;';&lt;BR /&gt;&amp;nbsp; put 'This is a system-generated message. Do not reply to this e-mail.';&lt;BR /&gt;&amp;nbsp; put '!EM_SEND!';&lt;BR /&gt;&amp;nbsp; put '!EM_NEWMSG!';&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;if EOF then put '!EM_ABORT!';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend send_email;&lt;BR /&gt;%send_email;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am getting an error message as below when %send_email is excecuted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********Below is the error message in email logs******************************************************&lt;/P&gt;&lt;P&gt;WARNING: Email: 550 5.1.1 &amp;lt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt; Recipient address rejected: User unknown&lt;/P&gt;&lt;P&gt;WARNING: Bad email address: &lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ERROR: No email addresses specified.&lt;/P&gt;&lt;P&gt;FATAL: Unrecoverable I/O error detected in the execution of the DATA step program.&amp;nbsp; Aborted during the EXECUTION phase.&lt;/P&gt;&lt;P&gt;**************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this its not sending emails to the remaining users..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me how to add an exception to handle this error at the time of exection..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Dec 2014 07:01:33 GMT</pubDate>
    <dc:creator>K_HARI__PRASAD</dc:creator>
    <dc:date>2014-12-26T07:01:33Z</dc:date>
    <item>
      <title>data step execution aborted while sending the emails from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-execution-aborted-while-sending-the-emails-from-sas/m-p/162817#M263471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mails data set looks as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="101" style="border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:ghi@some.com"&gt;ghi@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:jkl@some.com"&gt;jkl@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000;"&gt;&lt;A class="jive-link-email-small" href="mailto:def@some.com"&gt;def@some.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;consider &lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt; is a wrong email&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of now my code looks as follows;;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STEP=1: Sorting the data set.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;PROC SORT DATA=mails;&lt;/P&gt;&lt;P&gt;BY mail_id;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STEP=2 : Sending mails for every three hundred users after holding the triggering mails process for 2 mnts..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro send_email;&lt;/P&gt;&lt;P&gt;filename hm_mail email lrecl=32000 type='text/html';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; set mails END=EOF;&lt;BR /&gt; by mail_id;&lt;BR /&gt; file hm_mail;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; retain numofusers 0;&lt;/P&gt;&lt;P&gt;if first.mail_id then do;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numofusers=numofusers+1;&lt;BR /&gt;&amp;nbsp; If mod(numofusers,300) = 0 then Timer=Sleep(120,1);&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; put '!EM_TO!' mail_id;&lt;BR /&gt;&amp;nbsp; put '!EM_SUBJECT!' 'Test Plans have been created.';&lt;BR /&gt;&amp;nbsp; put 'The following test plans have been created with you as a tester.';&lt;BR /&gt;&amp;nbsp; put '&amp;lt;br&amp;gt;';&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;id_link = '&amp;lt;a href="' ||left(strip(id)) || '"&amp;gt;' || left(strip(id)) || '&amp;lt;/a&amp;gt;' ;&lt;BR /&gt; put '&amp;lt;br&amp;gt;';&lt;BR /&gt; put id_link;&lt;BR /&gt; put '&amp;lt;br&amp;gt;';&lt;/P&gt;&lt;P&gt;if last.mail_id then do;&lt;BR /&gt;&amp;nbsp; put '&amp;lt;br&amp;gt;';&lt;BR /&gt;&amp;nbsp; put 'This is a system-generated message. Do not reply to this e-mail.';&lt;BR /&gt;&amp;nbsp; put '!EM_SEND!';&lt;BR /&gt;&amp;nbsp; put '!EM_NEWMSG!';&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;if EOF then put '!EM_ABORT!';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend send_email;&lt;BR /&gt;%send_email;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am getting an error message as below when %send_email is excecuted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********Below is the error message in email logs******************************************************&lt;/P&gt;&lt;P&gt;WARNING: Email: 550 5.1.1 &amp;lt;&lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt; Recipient address rejected: User unknown&lt;/P&gt;&lt;P&gt;WARNING: Bad email address: &lt;A class="jive-link-email-small" href="mailto:abc123@some.com"&gt;abc123@some.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ERROR: No email addresses specified.&lt;/P&gt;&lt;P&gt;FATAL: Unrecoverable I/O error detected in the execution of the DATA step program.&amp;nbsp; Aborted during the EXECUTION phase.&lt;/P&gt;&lt;P&gt;**************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this its not sending emails to the remaining users..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me how to add an exception to handle this error at the time of exection..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2014 07:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-execution-aborted-while-sending-the-emails-from-sas/m-p/162817#M263471</guid>
      <dc:creator>K_HARI__PRASAD</dc:creator>
      <dc:date>2014-12-26T07:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: data step execution aborted while sending the emails from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-execution-aborted-while-sending-the-emails-from-sas/m-p/162818#M263472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;posted twice some problem same issue: &lt;A _jive_internal="true" href="https://communities.sas.com/message/243588#243588"&gt;https://communities.sas.com/message/243588#243588&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2014 09:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-execution-aborted-while-sending-the-emails-from-sas/m-p/162818#M263472</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-12-26T09:12:47Z</dc:date>
    </item>
  </channel>
</rss>

