<?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: Can you trigger a macro by using a %include ?? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180231#M34449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chances are, they are not executed.&amp;nbsp; Perhaps the %INCLUDE statement was merely copied from another program that did actually use the macros.&amp;nbsp; But other possibilities exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another %INCLUDE statement might bring in code that executes %MACRO_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another macro might execute, which executes %MACRO_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a short-running program, you might just remove the %INCLUDE, run the program, and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 17:04:33 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-01-13T17:04:33Z</dc:date>
    <item>
      <title>Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180228#M34446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking at a code and trying to understand how the macro gets triggered.&amp;nbsp; Program A has a %include that references program B.&amp;nbsp; Program B has 3 macros in it.&amp;nbsp; Nowhere in Program A or Program B do I see those 3 macros being referenced with %macro_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on what I understand, a macro gets executed when you use %macro_name to trigger it.&amp;nbsp; I don't see the 3 macro names referenced in any program.&amp;nbsp; How does the code trigger the 3 macros in this case?&amp;nbsp; Please let me know if I am not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 15:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180228#M34446</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2015-01-13T15:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180229#M34447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They don't.&amp;nbsp; You can create the template for the macro code as much as you like:&lt;/P&gt;&lt;P&gt;%macro XYZ ();&lt;/P&gt;&lt;P&gt;%mend XYZ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if nowhere in the code does: %XYZ (); appear then that macro does not get executed.&amp;nbsp; There is not trigger to insert the macro code anywhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 16:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180229#M34447</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-13T16:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180230#M34448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The macros would get compiled though so would be ready in that SAS session in case another program needed them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 16:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180230#M34448</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-13T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180231#M34449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chances are, they are not executed.&amp;nbsp; Perhaps the %INCLUDE statement was merely copied from another program that did actually use the macros.&amp;nbsp; But other possibilities exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another %INCLUDE statement might bring in code that executes %MACRO_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another macro might execute, which executes %MACRO_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a short-running program, you might just remove the %INCLUDE, run the program, and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 17:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180231#M34449</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-01-13T17:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180232#M34450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also you may wanna look for any 'Call execute' statement which also could be used to invoke a macro program from a DATA step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 00:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180232#M34450</guid>
      <dc:creator>vmurali</dc:creator>
      <dc:date>2015-01-14T00:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you trigger a macro by using a %include ??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180233#M34451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To check, add a statement to the macros in program B like %put 'Macro executed now';&lt;/P&gt;&lt;P&gt;Then look in the log for this message.&lt;/P&gt;&lt;P&gt;It may well be that the same macros or any statements that have the same effect are already executed in/from the autoexec.sas&lt;/P&gt;&lt;P&gt;Also consider using options mlogic to see when a macro is being executed and what it does.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 06:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-trigger-a-macro-by-using-a-include/m-p/180233#M34451</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-01-14T06:32:42Z</dc:date>
    </item>
  </channel>
</rss>

