<?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: Value of Macro Variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704669#M216042</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example to illustrate what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt; explained :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=10+20;

data _NULL_;
y = 5 * &amp;amp;x. * 2; /* 5*10+20*2 */
z = 5 * %eval(&amp;amp;x.) *2; /* 5*30*2 */
put y=; /* 90 (50+40) not 300 (5*30*2) */ 
put z=; /* 300 */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Dec 2020 09:44:47 GMT</pubDate>
    <dc:creator>gamotte</dc:creator>
    <dc:date>2020-12-09T09:44:47Z</dc:date>
    <item>
      <title>Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704615#M216020</link>
      <description>&lt;P&gt;Hello SAS Communities,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the value of the following macro variable NewVbl?&lt;/P&gt;&lt;P&gt;%LET NewVbl = 10+20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 04:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704615#M216020</guid>
      <dc:creator>NikitaTovey</dc:creator>
      <dc:date>2020-12-09T04:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704622#M216023</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value of the macro variable is the value that you assign it and will remain the same until explicitly changed. Your macro variable newvbl will have a value of 10+20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a helpful link for better understanding how macros work:&amp;nbsp;&lt;A href="https://v8doc.sas.com/sashtml/macro/z1071889.htm" target="_blank" rel="noopener"&gt;https://v8doc.sas.com/sashtml/macro/z1071889.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704622#M216023</guid>
      <dc:creator>rhaley1821</dc:creator>
      <dc:date>2020-12-10T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704630#M216025</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350163"&gt;@rhaley1821&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The value of the macro variable is the value that you assign it and will remain the same until explicitly changed. &lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;Your macro variable newvbl will have a value of 30.&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a helpful link for better understanding how macros work:&amp;nbsp;&lt;A href="https://v8doc.sas.com/sashtml/macro/z1071889.htm" target="_blank" rel="noopener"&gt;https://v8doc.sas.com/sashtml/macro/z1071889.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, the value is the string assigned to the variable, if you want to calculate, you have to use %eval or %sysevalf.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/344402"&gt;@NikitaTovey&lt;/a&gt; see maxim 4 in &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 06:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704630#M216025</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-12-09T06:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704636#M216027</link>
      <description>It is the characters you just assigned. It is 10+20&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Dec 2020 06:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704636#M216027</guid>
      <dc:creator>JoshB</dc:creator>
      <dc:date>2020-12-09T06:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704643#M216031</link>
      <description>&lt;P&gt;Some teacher seems not not explain things very well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Creating-a-Macro-variable/m-p/704449" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Creating-a-Macro-variable/m-p/704449&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was another essentially identical question that I can't find as well.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 07:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704643#M216031</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-09T07:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Value of Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704669#M216042</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example to illustrate what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt; explained :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=10+20;

data _NULL_;
y = 5 * &amp;amp;x. * 2; /* 5*10+20*2 */
z = 5 * %eval(&amp;amp;x.) *2; /* 5*30*2 */
put y=; /* 90 (50+40) not 300 (5*30*2) */ 
put z=; /* 300 */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Dec 2020 09:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-of-Macro-Variable/m-p/704669#M216042</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-12-09T09:44:47Z</dc:date>
    </item>
  </channel>
</rss>

