<?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: How to make MEMNAME work with macro variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765811#M242601</link>
    <description>&lt;P&gt;try change from&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;'&amp;amp;prefix._temp';&lt;/LI-CODE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;"&amp;amp;prefix._temp";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Single quotation marks do not resolve macros, while double quotation marks do.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Sep 2021 08:17:17 GMT</pubDate>
    <dc:creator>japelin</dc:creator>
    <dc:date>2021-09-03T08:17:17Z</dc:date>
    <item>
      <title>How to make MEMNAME work with macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765807#M242598</link>
      <description>&lt;P&gt;I've got some code that's being reused by 5 SAS-scripts that's running in parallel. Each of the 5 scripts have a prefix-macro that's used in the reusable code, to make sure that work table names are unique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example: The 1st SAS-script sets %let prefix = cust, and the 2nd sets %let prefix = prod. Then the reusable code uses a work table called &amp;amp;prefix._temp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This fails because MEMNAME doesn't accept the prefix-macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	set sashelp.vcolumn end=eof;
	where libname = 'WORK' and lowcase(memname) = '&amp;amp;prefix._temp';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If I use this it works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	set sashelp.vcolumn end=eof;
	where libname = 'WORK' and lowcase(memname) = 'cust_temp';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is there a way to make MEMNAME work with my prefixes? If I type the prefix manually it's no longer reusable.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 08:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765807#M242598</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2021-09-03T08:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to make MEMNAME work with macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765811#M242601</link>
      <description>&lt;P&gt;try change from&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;'&amp;amp;prefix._temp';&lt;/LI-CODE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;"&amp;amp;prefix._temp";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Single quotation marks do not resolve macros, while double quotation marks do.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 08:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765811#M242601</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-09-03T08:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to make MEMNAME work with macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765815#M242604</link>
      <description>Ugh, I should've remembered. Thanks. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 03 Sep 2021 08:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-MEMNAME-work-with-macro-variable/m-p/765815#M242604</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2021-09-03T08:57:49Z</dc:date>
    </item>
  </channel>
</rss>

