<?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 in ods rtf bookmark in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/487988#M127173</link>
    <description>&lt;P&gt;Hallo&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226997"&gt;@JensK&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is that macro variable reference&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;table&lt;/FONT&gt;&amp;nbsp;is not resolved because of the single quotes surrounding it. (You've probably got a warning in the log: "&lt;FONT face="courier new,courier"&gt;Apparent symbolic reference TABLE not resolved.&lt;/FONT&gt;") If you use &lt;EM&gt;double&lt;/EM&gt; &lt;EM&gt;quotes&lt;/EM&gt; instead,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&amp;amp;table&lt;/FONT&gt;&amp;nbsp;will be resolved so that the compiler will see the&amp;nbsp;value (2) stored in the macro variable rather than an invalid expression containing an&amp;nbsp;ampersand.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf bookmark = "&amp;amp;table..1";&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 18 Aug 2018 10:24:05 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2018-08-18T10:24:05Z</dc:date>
    <item>
      <title>Macro variable in ods rtf bookmark</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/487985#M127172</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not have much experience in creating automatic reports in SAS. I experienced a problem while creating a report. I use ODS RTF and would like to set a bookmark by a macro variable. However, it does not work out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layout of the bookmark should be "2.1." with varying numbers indicated by a macro variable in the first position.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assign a macro variable by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro compute;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%global table;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%let table=2;&lt;BR /&gt;%mend compute;&lt;BR /&gt;%compute;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and call a SAS code that creates the rtf-file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bookmark is set by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods rtf bookmark = '&amp;amp;table..1';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that it is not allowed to use the &amp;amp;-sign in the bookmark statement.&lt;/P&gt;&lt;P&gt;(The anchor value "&amp;amp;table..13.14" is not valid for the "RTF" destination; anchors cannot contain white space, control characters, or any of the following: "()&amp;lt;&amp;gt;[]{}/%&amp;amp;\". Anchor value will be ignored.)&lt;/P&gt;&lt;P&gt;Thank you for your suggestions to solve that problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jens&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Aug 2018 08:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/487985#M127172</guid>
      <dc:creator>JensK</dc:creator>
      <dc:date>2018-08-18T08:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable in ods rtf bookmark</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/487988#M127173</link>
      <description>&lt;P&gt;Hallo&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226997"&gt;@JensK&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is that macro variable reference&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;table&lt;/FONT&gt;&amp;nbsp;is not resolved because of the single quotes surrounding it. (You've probably got a warning in the log: "&lt;FONT face="courier new,courier"&gt;Apparent symbolic reference TABLE not resolved.&lt;/FONT&gt;") If you use &lt;EM&gt;double&lt;/EM&gt; &lt;EM&gt;quotes&lt;/EM&gt; instead,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&amp;amp;table&lt;/FONT&gt;&amp;nbsp;will be resolved so that the compiler will see the&amp;nbsp;value (2) stored in the macro variable rather than an invalid expression containing an&amp;nbsp;ampersand.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf bookmark = "&amp;amp;table..1";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Aug 2018 10:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/487988#M127173</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-08-18T10:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable in ods rtf bookmark</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/488057#M127204</link>
      <description>&lt;P&gt;Hallo &lt;SPAN class="UserName lia-user-name lia-user-rank-Trusted-Advisor"&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_self"&gt;&lt;SPAN class="login-bold"&gt;FreelanceReinhard,&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Trusted-Advisor"&gt;&lt;SPAN class="login-bold"&gt;thank you for the solution. It works and the rtf-file look like it is supposed to.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Trusted-Advisor"&gt;&lt;SPAN class="login-bold"&gt;Best,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Trusted-Advisor"&gt;&lt;SPAN class="login-bold"&gt;Jens&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 10:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable-in-ods-rtf-bookmark/m-p/488057#M127204</guid>
      <dc:creator>JensK</dc:creator>
      <dc:date>2018-08-19T10:35:59Z</dc:date>
    </item>
  </channel>
</rss>

