<?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: Macro variable  -&amp;gt; paragraph text with CR LF in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391731#M277686</link>
    <description>&lt;P&gt;There is nothing stopping you from putting CR and LF into macro variables. &amp;nbsp;For example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('email_message',cats('Line one.','0D0A'x,'Line two.'));
run;
%let email_message=%superq(email_message);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it would probably be easier for the user and for your coding if you just told them to replace the paragraph marks with some fixed printable character or series of characters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let email_message=Line one.|Line two.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then your program can replace them with paragraph marks when it generates the email.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2017 05:07:27 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-08-30T05:07:27Z</dc:date>
    <item>
      <title>Macro variable  -&gt; paragraph text with CR LF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391722#M277685</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am finding myself in a tight corner, and I would really appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question :&amp;nbsp;&lt;/STRONG&gt;How can I assign text with paragraphs(CR LF) to a SAS Macro Variable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Short story:&amp;nbsp;&lt;/STRONG&gt;I am currently working on a generic solution for sending e-mails from SAS. &amp;nbsp;This should be in a form of a macro : %SendMail(To,From,Subject,Body ... ) . The user should only call the macro and feed the proper parameters.&lt;/P&gt;&lt;P&gt;All is good until you realize that the e-mail body will contain&amp;nbsp;long text with paragraphs (i.e. CR LR) . &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I assign a text with paragraphs to a macro variable ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 04:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391722#M277685</guid>
      <dc:creator>urs</dc:creator>
      <dc:date>2017-08-30T04:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable  -&gt; paragraph text with CR LF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391731#M277686</link>
      <description>&lt;P&gt;There is nothing stopping you from putting CR and LF into macro variables. &amp;nbsp;For example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('email_message',cats('Line one.','0D0A'x,'Line two.'));
run;
%let email_message=%superq(email_message);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it would probably be easier for the user and for your coding if you just told them to replace the paragraph marks with some fixed printable character or series of characters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let email_message=Line one.|Line two.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then your program can replace them with paragraph marks when it generates the email.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 05:07:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391731#M277686</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-30T05:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable  -&gt; paragraph text with CR LF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391734#M277687</link>
      <description>Thank you Tom.&lt;BR /&gt;&lt;BR /&gt;Setting up a convention on how to build e-mail bodies should do the trick.</description>
      <pubDate>Wed, 30 Aug 2017 05:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-gt-paragraph-text-with-CR-LF/m-p/391734#M277687</guid>
      <dc:creator>urs</dc:creator>
      <dc:date>2017-08-30T05:31:12Z</dc:date>
    </item>
  </channel>
</rss>

