<?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: passing numeric value in the MACRO in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168217#M12253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use the macro variable reference at any place that you would normally type the number into your code.&amp;nbsp; Remember that macro is mainly just to generate code that will then be compiled and run the same as if it had been typed into the original program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro loopy(start,stop);&lt;/P&gt;&lt;P&gt; DO i=&amp;amp;start TO &amp;amp;stop ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PUT i=;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;%mend loopy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %loopy(start=5, stop=10);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is only of concern if you are trying to pass a floating point number and compare its value to the value of a dataset variable. Then you might need to adjust for rounding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jul 2014 12:29:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-07-07T12:29:46Z</dc:date>
    <item>
      <title>passing numeric value in the MACRO</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168215#M12251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could somebody help me with passing numeric value to the Macro variable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO1(TPM=1000,X1=TEST);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO MACRO1(TPM,X1);&lt;/P&gt;&lt;P&gt;%PUT "This is the value of &amp;amp;TPM";&lt;/P&gt;&lt;P&gt;%MEND MACRO1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However as i understand Macro take only Text how do i make sure it has numeric value inside of the macro while execution.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 08:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168215#M12251</guid>
      <dc:creator>rkumar23</dc:creator>
      <dc:date>2014-07-07T08:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: passing numeric value in the MACRO</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168216#M12252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you using the macro variable?&amp;nbsp; It depends on the situation, but you could do a check in your macro per:&lt;/P&gt;&lt;P&gt;%MACRO MACRO1(TPM,X1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; %if %sysfunc(anyalpha("&amp;amp;TPM."))&amp;gt;0 %then %put "Non numeric found";&lt;/P&gt;&lt;P&gt;&amp;nbsp; %else %PUT "This is the value of &amp;amp;TPM";&lt;/P&gt;&lt;P&gt;%MEND MACRO1;&lt;/P&gt;&lt;P&gt;%MACRO1(TPM=a10a00,X1=TEST);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 09:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168216#M12252</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-07T09:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: passing numeric value in the MACRO</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168217#M12253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use the macro variable reference at any place that you would normally type the number into your code.&amp;nbsp; Remember that macro is mainly just to generate code that will then be compiled and run the same as if it had been typed into the original program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro loopy(start,stop);&lt;/P&gt;&lt;P&gt; DO i=&amp;amp;start TO &amp;amp;stop ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PUT i=;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;%mend loopy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %loopy(start=5, stop=10);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is only of concern if you are trying to pass a floating point number and compare its value to the value of a dataset variable. Then you might need to adjust for rounding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 12:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168217#M12253</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-07T12:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: passing numeric value in the MACRO</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168218#M12254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check&amp;nbsp; %eval() and %sysevalf() &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 12:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/passing-numeric-value-in-the-MACRO/m-p/168218#M12254</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-07-07T12:45:41Z</dc:date>
    </item>
  </channel>
</rss>

