<?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 a macro inside a macro in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439680#M28405</link>
    <description>&lt;P&gt;The call execute is unnecessary here. This ought to work (assuming macro %addinfo is defined).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro x;
%if &amp;amp;n.&amp;gt;0 %then %do;
proc append base=a data=b;run;
%addInfo
%end;
%mend;

%x&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2018 13:05:03 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-02-23T13:05:03Z</dc:date>
    <item>
      <title>call a macro inside a macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439677#M28404</link>
      <description>&lt;P&gt;Hi. I have a macro where I want to do 2 things if n&amp;gt;0 (else do nothing). I want to append a data set to an existing table, and I want to call for another macro. I get this error message referring to the call of the macro: "Statement is not valid or it is used out of proper order." Can anyone help me?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro x;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%if &amp;amp;n.&amp;gt;0 %then %do;&lt;/P&gt;
&lt;P&gt;proc append base=a data=b;run;&lt;BR /&gt; call execute("%addInfo");&lt;BR /&gt; %end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;%x;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 12:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439677#M28404</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2018-02-23T12:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: call a macro inside a macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439680#M28405</link>
      <description>&lt;P&gt;The call execute is unnecessary here. This ought to work (assuming macro %addinfo is defined).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro x;
%if &amp;amp;n.&amp;gt;0 %then %do;
proc append base=a data=b;run;
%addInfo
%end;
%mend;

%x&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 13:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439680#M28405</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-02-23T13:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: call a macro inside a macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439683#M28406</link>
      <description>Thank you! That worked fine.</description>
      <pubDate>Fri, 23 Feb 2018 13:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-a-macro-inside-a-macro/m-p/439683#M28406</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2018-02-23T13:16:19Z</dc:date>
    </item>
  </channel>
</rss>

