<?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: How to use a macro variable in ods html in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735438#M229107</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Try this */
%let Month = Apr;
%let Year = 2021;
filename outbox "%sysfunc(pathname(work))/test.html";

ods html body=outbox style=normal rs=none;

ods html text="&amp;lt;div align='left'&amp;gt; Dear Team,&amp;lt;BR&amp;gt;
&amp;lt;BR&amp;gt; Kindly refer to the attached report for 500 &amp;amp;Month. &amp;amp;Year..
&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt; Thank You!&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;



&amp;lt;/div&amp;gt;";
proc print data=sashelp.class(obs=3);
run;

ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 07:20:52 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2021-04-20T07:20:52Z</dc:date>
    <item>
      <title>How to use a macro variable in ods html</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735433#M229103</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;ods html body=outbox style=normal rs=none;&lt;BR /&gt;&lt;BR /&gt;ods html text="&amp;lt;div align='left'&amp;gt; Dear Team,&amp;lt;BR&amp;gt;&lt;BR /&gt;&amp;lt;BR&amp;gt; Kindly refer to the attached report for 500 Apr 2021.&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;br&amp;gt; Thank You!&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;";&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I want to make "Apr 2021" as a variable which I created earlier. &amp;amp;Month &amp;amp;Year. How can I call it in the html?&lt;BR /&gt;ods html close;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735433#M229103</guid>
      <dc:creator>Azuki707</dc:creator>
      <dc:date>2021-04-20T06:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a macro variable in ods html</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735438#M229107</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Try this */
%let Month = Apr;
%let Year = 2021;
filename outbox "%sysfunc(pathname(work))/test.html";

ods html body=outbox style=normal rs=none;

ods html text="&amp;lt;div align='left'&amp;gt; Dear Team,&amp;lt;BR&amp;gt;
&amp;lt;BR&amp;gt; Kindly refer to the attached report for 500 &amp;amp;Month. &amp;amp;Year..
&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt; Thank You!&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;



&amp;lt;/div&amp;gt;";
proc print data=sashelp.class(obs=3);
run;

ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 07:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735438#M229107</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2021-04-20T07:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a macro variable in ods html</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735440#M229108</link>
      <description>It works! Thanks!</description>
      <pubDate>Tue, 20 Apr 2021 07:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-macro-variable-in-ods-html/m-p/735440#M229108</guid>
      <dc:creator>Azuki707</dc:creator>
      <dc:date>2021-04-20T07:33:45Z</dc:date>
    </item>
  </channel>
</rss>

