<?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: Macro Name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490310#M128244</link>
    <description>&lt;P&gt;Works fine for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let i=1 ;
%let var1=bank;
%macro attrib_bank;
* part of a data step ;
%mend attrib_bank;

options mprint;
data test_bank;
  %attrib_&amp;amp;&amp;amp;var&amp;amp;i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;17    data test_bank;
18      %attrib_&amp;amp;&amp;amp;var&amp;amp;i;
MPRINT(ATTRIB_BANK):   * part of a data step ;
19    run;

NOTE: The data set WORK.TEST_BANK has 1 observations and 0 variables.
&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Aug 2018 02:58:39 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-08-28T02:58:39Z</dc:date>
    <item>
      <title>Macro Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490268#M128221</link>
      <description>&lt;P&gt;&amp;nbsp; The macro variabe &amp;amp;&amp;amp;var&amp;amp;i. resolves to Bank, credit etc etc.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; There are attribute macros like %attrib_bank,%attrib_credit etc&lt;BR /&gt;&lt;BR /&gt;I would like to the correct attribute based on the dataset name&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now is there a way how to append the &amp;amp;&amp;amp;var&amp;amp;i to %attrib_ so the correct attribute is passed based on &amp;amp;&amp;amp;var&amp;amp;i?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;For i=1&lt;BR /&gt;&amp;amp;&amp;amp;var&amp;amp;i. resolves to Bank&lt;BR /&gt;data test_bank;&lt;BR /&gt;%attrib_??;-----The challenge is here, to execute %attrib_bank&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490268#M128221</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2018-08-27T21:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490272#M128222</link>
      <description>&lt;P&gt;%attrib_&amp;amp;&amp;amp;var&amp;amp;i. -&amp;gt; that doesn't work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16600"&gt;@SASPhile&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp; The macro variabe &amp;amp;&amp;amp;var&amp;amp;i. resolves to Bank, credit etc etc.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; There are attribute macros like %attrib_bank,%attrib_credit etc&lt;BR /&gt;&lt;BR /&gt;I would like to the correct attribute based on the dataset name&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now is there a way how to append the &amp;amp;&amp;amp;var&amp;amp;i to %attrib_ so the correct attribute is passed based on &amp;amp;&amp;amp;var&amp;amp;i?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;For i=1&lt;BR /&gt;&amp;amp;&amp;amp;var&amp;amp;i. resolves to Bank&lt;BR /&gt;data test_bank;&lt;BR /&gt;%attrib_??;-----The challenge is here, to execute %attrib_bank&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490272#M128222</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-27T21:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490310#M128244</link>
      <description>&lt;P&gt;Works fine for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let i=1 ;
%let var1=bank;
%macro attrib_bank;
* part of a data step ;
%mend attrib_bank;

options mprint;
data test_bank;
  %attrib_&amp;amp;&amp;amp;var&amp;amp;i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;17    data test_bank;
18      %attrib_&amp;amp;&amp;amp;var&amp;amp;i;
MPRINT(ATTRIB_BANK):   * part of a data step ;
19    run;

NOTE: The data set WORK.TEST_BANK has 1 observations and 0 variables.
&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Aug 2018 02:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Name/m-p/490310#M128244</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-08-28T02:58:39Z</dc:date>
    </item>
  </channel>
</rss>

