<?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: SAS Code issues in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213123#M39371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not use the data step to send the email instead of calling a macro?&amp;nbsp; That would eliminate the need to worry about macro quoting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm"&gt;http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Mar 2015 23:42:20 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-03-30T23:42:20Z</dc:date>
    <item>
      <title>SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213120#M39368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;For the code below, if "error" variable in the following work.merge dataset loaded into hash table has values that contain many special characters like [,./;'etc]. How do I make the following code works? (please just focus on error variable which is highlighted in blue, that is where I get the error in the log)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro Email(email=,suite=,reference=,&lt;SPAN style="color: #3366ff;"&gt;error&lt;/SPAN&gt;=,time=,abortcode=,);&lt;BR /&gt;FILENAME Mailbox EMAIL "&amp;amp;email"&lt;BR /&gt;Subject= "";&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;FILE Mailbox;&lt;BR /&gt;PUT "Hello";&lt;/P&gt;&lt;P&gt;PUT "Error message: &lt;SPAN style="color: #0000ff;"&gt;&amp;amp;error&lt;/SPAN&gt;";&lt;BR /&gt;PUT "Run time: &amp;amp;time";&lt;BR /&gt;PUT "Abortcode: &amp;amp;abortcode";&lt;/P&gt;&lt;P&gt;RUN;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length email $200 suite $200 reference $200 &lt;SPAN style="color: #3366ff;"&gt;errormsg&lt;/SPAN&gt; $200 time $200 abortcode $200;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _n_=1 then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash myhash(dataset: 'work.merge',ordered:'a'); /* sort order is ascending */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hiter iter('myhash');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.definekey('suite'); /* define a key */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.definedata('Email','Suite','Reference',&lt;SPAN style="color: #3366ff;"&gt;'errormsg'&lt;/SPAN&gt;,'time','abortcode'); /* getting the columns */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.definedone(); /* finish the definitions */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call missing(email, suite,reference,&lt;SPAN style="color: #3366ff;"&gt;errormsg&lt;/SPAN&gt;,time,abortcode); /* avoid uninitialized variable notes (miss in the dataset not in hash)*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Iterate through the hash object and output data values */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = iter.first();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do while (rc = 0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute('%Email(email='||Email||',suite='||Suite||',reference='||Reference||',&lt;SPAN style="color: #3366ff;"&gt;error='||errormsg||'&lt;/SPAN&gt;,time='||time||',abortcode='||abortcode||')' );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = iter.next();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 22:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213120#M39368</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-03-30T22:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213121#M39369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You likely want to use one of the quoting functions like %superq(error). Note: SuperQ does not want &amp;amp;error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 22:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213121#M39369</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-03-30T22:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213122#M39370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ballardw,&lt;/P&gt;&lt;P&gt;where should I put %superq(error)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 23:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213122#M39370</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-03-30T23:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213123#M39371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not use the data step to send the email instead of calling a macro?&amp;nbsp; That would eliminate the need to worry about macro quoting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm"&gt;http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#a001412669.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 23:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213123#M39371</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-30T23:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213124#M39372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;There are thousands record in SAS table each contains different email address.&lt;/P&gt;&lt;P&gt;I want to use hash iterator to read each email record in the table and execute the email macro&amp;nbsp; to send out the email to their corresponding users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 23:50:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213124#M39372</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-03-30T23:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code issues</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213125#M39373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you read the page I linked to?&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;You can use conditional logic in the DATA step to send multiple messages and to control which recipients receive which message. For example, suppose you want to send customized reports to members of two different departments. Here is a DATA step example:&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 23:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Code-issues/m-p/213125#M39373</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-30T23:56:28Z</dc:date>
    </item>
  </channel>
</rss>

