<?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 Resolving macro variable inside ODS PDF text in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230065#M14498</link>
    <description>&lt;P&gt;I am attempting to resolve a formatted macro variable inside ODS PDF text but am getting the error message below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ERROR: More positional parameters found than defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I&amp;nbsp;remove the formatting from the 'total' it prints as expected, but it has to be comma formatted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code is below. &amp;nbsp;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select count(zip) format=comma10. into :total&lt;/P&gt;&lt;P&gt;from sashelp.zipcode;&lt;BR /&gt;quit; %put &amp;amp;&lt;SPAN&gt;total&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods pdf file = 'c:\test.pdf';&lt;/P&gt;&lt;P&gt;ods pdf text = "This is the total: %left(&amp;amp;total)";&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 12:30:47 GMT</pubDate>
    <dc:creator>kimdukes77</dc:creator>
    <dc:date>2015-10-15T12:30:47Z</dc:date>
    <item>
      <title>Resolving macro variable inside ODS PDF text</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230065#M14498</link>
      <description>&lt;P&gt;I am attempting to resolve a formatted macro variable inside ODS PDF text but am getting the error message below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ERROR: More positional parameters found than defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I&amp;nbsp;remove the formatting from the 'total' it prints as expected, but it has to be comma formatted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code is below. &amp;nbsp;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select count(zip) format=comma10. into :total&lt;/P&gt;&lt;P&gt;from sashelp.zipcode;&lt;BR /&gt;quit; %put &amp;amp;&lt;SPAN&gt;total&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods pdf file = 'c:\test.pdf';&lt;/P&gt;&lt;P&gt;ods pdf text = "This is the total: %left(&amp;amp;total)";&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 12:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230065#M14498</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2015-10-15T12:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Resolving macro variable inside ODS PDF text</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230074#M14499</link>
      <description>&lt;P&gt;You're getting that error because the %LEFT function sees something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%left(&amp;nbsp;&amp;nbsp; 123,456)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The comma appears to %LEFT as marking the end of the first parameter and the start of the second parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simplest solution would be to get rid of %LEFT.&amp;nbsp; First, remove leading blanks from &amp;amp;TOTAL using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let total = &amp;amp;total;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can simplify the later statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods pdf text = "This is the total: &amp;amp;total";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 13:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230074#M14499</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-15T13:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Resolving macro variable inside ODS PDF text</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230076#M14501</link>
      <description>&lt;P&gt;Worked brilliantly, thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 13:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resolving-macro-variable-inside-ODS-PDF-text/m-p/230076#M14501</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2015-10-15T13:15:44Z</dc:date>
    </item>
  </channel>
</rss>

