<?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: getting Macro variable values from string provided in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547238#M151601</link>
    <description>&lt;P&gt;Thank you very much Paige, You saved my day!&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 15:25:31 GMT</pubDate>
    <dc:creator>Hitesh</dc:creator>
    <dc:date>2019-03-29T15:25:31Z</dc:date>
    <item>
      <title>getting Macro variable values from string provided</title>
      <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547227#M151597</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I have a problem getting numeric values for a Macro variable in a do loop. Example codes are:&lt;/P&gt;
&lt;P&gt;%Macro abcd(aa=0.44 0.3 2 1, st=1, ed=4);&lt;/P&gt;
&lt;P&gt;data abc;&lt;BR /&gt;M=1;&lt;BR /&gt;V=100;&lt;/P&gt;
&lt;P&gt;%do i=&amp;amp;st %to &amp;amp;ed;&lt;BR /&gt;%LET wt=%scan(&amp;amp;aa, &amp;amp;i);&lt;BR /&gt;MT=M+V; output;&lt;BR /&gt;%PUT &amp;amp;wt;&lt;BR /&gt;%END;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;%MEND;&lt;/P&gt;
&lt;P&gt;%abcd;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting values 0, 44, 0, 3 instead of 0.44, 0.3, 2, 1. Please help me getting the correct value for each iteration.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Hitesh&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547227#M151597</guid>
      <dc:creator>Hitesh</dc:creator>
      <dc:date>2019-03-29T15:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: getting Macro variable values from string provided</title>
      <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547231#M151598</link>
      <description>&lt;P&gt;You probably need the third argument in the %SCAN function to indicate that a space is the delimiter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET wt=%scan(&amp;amp;aa, &amp;amp;i, %str( ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547231#M151598</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-29T15:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: getting Macro variable values from string provided</title>
      <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547235#M151600</link>
      <description>&lt;P&gt;Your macro makes no sense to me, as it does NOTHING except put some text into the log and making the data step create 4 identical observations.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547235#M151600</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-29T15:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: getting Macro variable values from string provided</title>
      <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547238#M151601</link>
      <description>&lt;P&gt;Thank you very much Paige, You saved my day!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547238#M151601</guid>
      <dc:creator>Hitesh</dc:creator>
      <dc:date>2019-03-29T15:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: getting Macro variable values from string provided</title>
      <link>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547239#M151602</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;
&lt;P&gt;It was just sample code. I am using that to provide different weights to different year data in my actual macro where these values need to provide by user and can vary for each year.&lt;/P&gt;
&lt;P&gt;Thanks for the response.&lt;/P&gt;
&lt;P&gt;Hitesh&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/getting-Macro-variable-values-from-string-provided/m-p/547239#M151602</guid>
      <dc:creator>Hitesh</dc:creator>
      <dc:date>2019-03-29T15:28:58Z</dc:date>
    </item>
  </channel>
</rss>

