<?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: Call include statement within Macro if/else if in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-include-statement-within-Macro-if-else-if/m-p/204041#M15268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless those include files have identically named macros (and nothing else) with different behavior I would suggest you are spending a lot of time for not much reward. And if you do have the same named macro in each that is generally not a good idea. If they do different things they should have a different name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since compiling macros takes relatively few processes, include all of the macro source code at the start of the job, or investigate AUTOCALL macro libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting errors? What value(s) of UPD that is causing the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you run this with OPTIONS MPRINT SOURCE2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2015 15:53:12 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-08-21T15:53:12Z</dc:date>
    <item>
      <title>Call include statement within Macro if/else if</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-include-statement-within-Macro-if-else-if/m-p/204040#M15267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to call a different include statement inside of a macro, but having the include different based on if a different macro is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro DDL;&lt;/P&gt;&lt;P&gt; %if &amp;amp;upd = 2 or &amp;amp;upd = 4 or &amp;amp;upd = 5 %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %include "/test/&amp;amp;csv..sas";&lt;/P&gt;&lt;P&gt; %end;&lt;/P&gt;&lt;P&gt; %else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %include "/test/&amp;amp;fn..sas";&lt;/P&gt;&lt;P&gt; %end;&lt;/P&gt;&lt;P&gt;%mend DDL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%DDL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside each of those is a different macro that needs to be used in a proc sql statement, but when I put this logic in my program is not reading the macor &amp;amp;Query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I had it just this it would work: %include "/test/&amp;amp;fn..sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure it's including it from the macro.. any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 20:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-include-statement-within-Macro-if-else-if/m-p/204040#M15267</guid>
      <dc:creator>Bensansing</dc:creator>
      <dc:date>2015-08-20T20:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Call include statement within Macro if/else if</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-include-statement-within-Macro-if-else-if/m-p/204041#M15268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless those include files have identically named macros (and nothing else) with different behavior I would suggest you are spending a lot of time for not much reward. And if you do have the same named macro in each that is generally not a good idea. If they do different things they should have a different name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since compiling macros takes relatively few processes, include all of the macro source code at the start of the job, or investigate AUTOCALL macro libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting errors? What value(s) of UPD that is causing the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you run this with OPTIONS MPRINT SOURCE2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 15:53:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-include-statement-within-Macro-if-else-if/m-p/204041#M15268</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-21T15:53:12Z</dc:date>
    </item>
  </channel>
</rss>

