<?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 question help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16761#M2369</link>
    <description>Hi:&lt;BR /&gt;
  Macro variables that are parameters to the macro program (yours are positional parameters) are LOCAL in scope to the Macro program. So when %func_1 is over, its macro variables are automatically "cleaned up" -- the LOCAL macro symbol table goes away when the macro program finishes. Unless those macro variables were previously defined to be GLOBAL in scope. The same applies to %func_2. &lt;BR /&gt;
&lt;BR /&gt;
You might have referencing issues if %func_1 called %func_2 or vice versa. But generally you won't need to manually do any cleanup. Although if you DID need to ever do cleanup, there are ways to do it...from the simple %let:&lt;BR /&gt;
&lt;BR /&gt;
%let var_list=;  &amp;lt;--- which blanks out the macro variable value&lt;BR /&gt;
&lt;BR /&gt;
to the complex -- the CALL SYMDEL or %SYMDEL statements (http://support.sas.com/documentation/cdl/en/mcrolref/59526/HTML/default/a001651249.htm ).&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
    <pubDate>Fri, 09 May 2008 14:43:07 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-05-09T14:43:07Z</dc:date>
    <item>
      <title>MACRO question help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16760#M2368</link>
      <description>I have two MACROs defined using the same maco variables as the following:&lt;BR /&gt;
&lt;BR /&gt;
%MACRO func_1(datain, dataout, var_list);&lt;BR /&gt;
    ........&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%MACRO func_2(datain, dataout, var_list);&lt;BR /&gt;
    .....&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
In the same SAS session, if I may run both two macros several times,&lt;BR /&gt;
should I do something to release the macro variables? How?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Fri, 09 May 2008 14:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16760#M2368</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-09T14:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: MACRO question help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16761#M2369</link>
      <description>Hi:&lt;BR /&gt;
  Macro variables that are parameters to the macro program (yours are positional parameters) are LOCAL in scope to the Macro program. So when %func_1 is over, its macro variables are automatically "cleaned up" -- the LOCAL macro symbol table goes away when the macro program finishes. Unless those macro variables were previously defined to be GLOBAL in scope. The same applies to %func_2. &lt;BR /&gt;
&lt;BR /&gt;
You might have referencing issues if %func_1 called %func_2 or vice versa. But generally you won't need to manually do any cleanup. Although if you DID need to ever do cleanup, there are ways to do it...from the simple %let:&lt;BR /&gt;
&lt;BR /&gt;
%let var_list=;  &amp;lt;--- which blanks out the macro variable value&lt;BR /&gt;
&lt;BR /&gt;
to the complex -- the CALL SYMDEL or %SYMDEL statements (http://support.sas.com/documentation/cdl/en/mcrolref/59526/HTML/default/a001651249.htm ).&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 09 May 2008 14:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16761#M2369</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-05-09T14:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: MACRO question help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16762#M2370</link>
      <description>great help.&lt;BR /&gt;
&lt;BR /&gt;
Thank you so much.</description>
      <pubDate>Fri, 09 May 2008 19:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MACRO-question-help/m-p/16762#M2370</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-09T19:18:22Z</dc:date>
    </item>
  </channel>
</rss>

