<?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 Displaying Macro variable in Title from Loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554344#M154204</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I trying to include the label from a do loop in a title, though the macro is not displayed in the title. Does anyone have any suggestions as to how to rectify this issue. This is an example of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; histogram_plot(sample_data=,vars=, year_l=,year_u=);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; y = &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;year_l.&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;year_u.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; proc univariate data=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;sample_data.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; noprint; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Amount Funded &amp;amp;y'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;histogram &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;vars.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / normal(mu=est sigma=est color=red w=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Fri, 26 Apr 2019 16:59:48 GMT</pubDate>
    <dc:creator>Jack_Sabbath</dc:creator>
    <dc:date>2019-04-26T16:59:48Z</dc:date>
    <item>
      <title>Displaying Macro variable in Title from Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554344#M154204</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I trying to include the label from a do loop in a title, though the macro is not displayed in the title. Does anyone have any suggestions as to how to rectify this issue. This is an example of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; histogram_plot(sample_data=,vars=, year_l=,year_u=);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; y = &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;year_l.&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;year_u.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; proc univariate data=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;sample_data.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; noprint; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Amount Funded &amp;amp;y'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;histogram &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;vars.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / normal(mu=est sigma=est color=red w=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 16:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554344#M154204</guid>
      <dc:creator>Jack_Sabbath</dc:creator>
      <dc:date>2019-04-26T16:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Macro variable in Title from Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554351#M154205</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249653"&gt;@Jack_Sabbath&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just an idea - try to change single quotes around title to double quotes, because the macro variable won't resolve within single quotes.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 17:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554351#M154205</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-04-26T17:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Macro variable in Title from Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554352#M154206</link>
      <description>&lt;P&gt;The macro processor ignores values inside of quoted strings using single quote characters on the outside.&amp;nbsp; Just switch to using double quote character to enclose your string instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Amount Funded &amp;amp;y";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think there are other issues with the code you posted, but that should fix the TITLE issue.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 17:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554352#M154206</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-26T17:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Macro variable in Title from Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554354#M154207</link>
      <description>&lt;P&gt;Forget macros and loops in this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=have;
    by year;
    title "Amount Funded #byval1";
    /* Your variable names go on the next line, I used x1 x2 x4 because I don't know your variable names */
    histogram x1 x2 x4/ normal(mu=est sigma=est color=red w=2.5);
run;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 17:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Macro-variable-in-Title-from-Loop/m-p/554354#M154207</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-26T17:32:39Z</dc:date>
    </item>
  </channel>
</rss>

