<?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 sasauto option and SAS macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400354#M278622</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the following program using the SAS EG.&amp;nbsp; I defined a macro run_macro in the main program.&amp;nbsp; I created a separate program macro_1.sas in /foldername/ folder which contains a macro macro_1.&amp;nbsp; After I make changes in macro_1.sas and run the main program, why is the SAS keep running the same codes before the changes? It runs the program correctly only if I close the SAS, re-open and run. Does someone know why?&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options pagesize=&lt;STRONG&gt;59&lt;/STRONG&gt;&amp;nbsp; mautosource&amp;nbsp; sasautos="/foldername/";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;run_macro&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;%* ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %macro_&lt;STRONG&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;%* ;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt; run_macro;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;run_macro&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 17:39:54 GMT</pubDate>
    <dc:creator>park2039</dc:creator>
    <dc:date>2017-10-02T17:39:54Z</dc:date>
    <item>
      <title>sasauto option and SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400354#M278622</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the following program using the SAS EG.&amp;nbsp; I defined a macro run_macro in the main program.&amp;nbsp; I created a separate program macro_1.sas in /foldername/ folder which contains a macro macro_1.&amp;nbsp; After I make changes in macro_1.sas and run the main program, why is the SAS keep running the same codes before the changes? It runs the program correctly only if I close the SAS, re-open and run. Does someone know why?&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options pagesize=&lt;STRONG&gt;59&lt;/STRONG&gt;&amp;nbsp; mautosource&amp;nbsp; sasautos="/foldername/";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;run_macro&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;%* ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; %macro_&lt;STRONG&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;%* ;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt; run_macro;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;run_macro&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 17:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400354#M278622</guid>
      <dc:creator>park2039</dc:creator>
      <dc:date>2017-10-02T17:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: sasauto option and SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400370#M278623</link>
      <description>&lt;P&gt;You are observing standard behavior.&amp;nbsp; SAS does not look for the macro definition each time you use the macro.&amp;nbsp; It only searches for the macro definition if the macro is not yet defined.&amp;nbsp; So you have changed the definition, but SAS doesn't look for the new definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a contining EG session, try adding a %INCLUDE statement to bring in the file holding the revised macro definition.&amp;nbsp; %INCLUDE can be placed either inside or outside a macro definition, wherever you see fit to redefine a macro.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 18:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400370#M278623</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-02T18:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: sasauto option and SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400436#M278624</link>
      <description>&lt;P&gt;You may also need to set the option MREPLACE to enable a previously defined macro to be replaced with the newer version.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 20:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasauto-option-and-SAS-macro/m-p/400436#M278624</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-02T20:04:07Z</dc:date>
    </item>
  </channel>
</rss>

