<?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: Storing Macro Variable Name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490043#M128100</link>
    <description>&lt;P&gt;Let me clarify. I do NOT want to evaluate the macro variable. I want the macro variable name.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 12:21:09 GMT</pubDate>
    <dc:creator>nbGuvnig</dc:creator>
    <dc:date>2018-08-27T12:21:09Z</dc:date>
    <item>
      <title>Storing Macro Variable Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490035#M128096</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to identify and store the name of a macro variable in another macro variable. I have been able to identify the name of the macro variable by using the %put "&amp;amp;="&amp;nbsp; command, but haven't been able to assign it to either a variable (data step) or another macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let car = ford;
put &amp;amp;=car;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how do I save the name from the log output to something tangible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR, Nis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 11:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490035#M128096</guid>
      <dc:creator>nbGuvnig</dc:creator>
      <dc:date>2018-08-27T11:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Storing Macro Variable Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490042#M128099</link>
      <description>&lt;PRE&gt;%let car = ford;
%put &amp;amp;car;&lt;/PRE&gt;&lt;P&gt;Try in this way.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 12:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490042#M128099</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-08-27T12:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Storing Macro Variable Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490043#M128100</link>
      <description>&lt;P&gt;Let me clarify. I do NOT want to evaluate the macro variable. I want the macro variable name.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 12:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490043#M128100</guid>
      <dc:creator>nbGuvnig</dc:creator>
      <dc:date>2018-08-27T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Storing Macro Variable Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490044#M128101</link>
      <description>&lt;P&gt;It looks like you have already done what you asked about.&amp;nbsp; If you want to refer to the name of the macro variable use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;car&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to refer to the value stored within &amp;amp;FORD, use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;&amp;amp;&amp;amp;car&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's something else entirely, you willl have to give an example of why your code doesn't do what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to find the name of the macro variable that contains:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ford&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then examine dictionary.macros.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 12:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Storing-Macro-Variable-Name/m-p/490044#M128101</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-27T12:22:46Z</dc:date>
    </item>
  </channel>
</rss>

