<?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: How to call a sas program inside a macro function in Advanced Programming</title>
    <link>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701272#M34</link>
    <description>&lt;P&gt;Can you please format your code for legibility and use a code box? It really helps for reading code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried removing the quotes in the comparison? I'm fairly certain that's required in macro coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro add_new_year_in_cal;
%global Path;

%let Path=/dwh_operation/sasprocess/smp_production/prod_smpi2/sasmacro/;

OPTIONS SASAUTOS=("&amp;amp;Path.");

%localizepilottbl;

%include "&amp;amp;Path.update_trigger.sas";
%put &amp;amp;UpdatePilotTblTrigger.;

%if &amp;amp;UpdatePilotTblTrigger. = Y %then
%do;
%include"&amp;amp;Path.copyfilefromreftosmpi2.sas";
%end;

%mend add_new_year_in_cal;&lt;BR /&gt;
options mprint;
%add_new_year_in_cal;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If that doesn't work, please post your log from your code after adding the MLOGIC option to your OPTIONS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;the function copyfilefromreftosmpi2.sas is not executed even if the updatepilottbltrigger=Y&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 16:36:11 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-11-24T16:36:11Z</dc:date>
    <item>
      <title>How to call a sas program inside a macro function</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701267#M31</link>
      <description>&lt;P&gt;%macro add_new_year_in_cal;&lt;BR /&gt;%global Path;&lt;/P&gt;
&lt;P&gt;%let Path=/dwh_operation/sasprocess/smp_production/prod_smpi2/sasmacro/;&lt;/P&gt;
&lt;P&gt;OPTIONS SASAUTOS=("&amp;amp;Path.");&lt;/P&gt;
&lt;P&gt;%localizepilottbl;&lt;/P&gt;
&lt;P&gt;%include "&amp;amp;Path.update_trigger.sas";&lt;BR /&gt;%put &amp;amp;UpdatePilotTblTrigger.;&lt;/P&gt;
&lt;P&gt;%if &amp;amp;UpdatePilotTblTrigger. = 'Y' %then &lt;BR /&gt;%do;&lt;BR /&gt;%include"&amp;amp;Path.copyfilefromreftosmpi2.sas";&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%mend add_new_year_in_cal;&lt;BR /&gt;options mprint;&lt;BR /&gt;%add_new_year_in_cal;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 16:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701267#M31</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-24T16:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a sas program inside a macro function</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701269#M32</link>
      <description>the function copyfilefromreftosmpi2.sas is not executed even if the updatepilottbltrigger=Y</description>
      <pubDate>Tue, 24 Nov 2020 16:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701269#M32</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-24T16:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a sas program inside a macro function</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701270#M33</link>
      <description>Always keep in mind that the macro processor is a text engine and does not need quotes for strings, as everything is a string.&lt;BR /&gt;You are testing for 'Y'. If your macro variable does not contain the quotes, the comparison will fail.</description>
      <pubDate>Tue, 24 Nov 2020 16:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701270#M33</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-24T16:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a sas program inside a macro function</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701272#M34</link>
      <description>&lt;P&gt;Can you please format your code for legibility and use a code box? It really helps for reading code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried removing the quotes in the comparison? I'm fairly certain that's required in macro coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro add_new_year_in_cal;
%global Path;

%let Path=/dwh_operation/sasprocess/smp_production/prod_smpi2/sasmacro/;

OPTIONS SASAUTOS=("&amp;amp;Path.");

%localizepilottbl;

%include "&amp;amp;Path.update_trigger.sas";
%put &amp;amp;UpdatePilotTblTrigger.;

%if &amp;amp;UpdatePilotTblTrigger. = Y %then
%do;
%include"&amp;amp;Path.copyfilefromreftosmpi2.sas";
%end;

%mend add_new_year_in_cal;&lt;BR /&gt;
options mprint;
%add_new_year_in_cal;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If that doesn't work, please post your log from your code after adding the MLOGIC option to your OPTIONS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;the function copyfilefromreftosmpi2.sas is not executed even if the updatepilottbltrigger=Y&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 16:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/How-to-call-a-sas-program-inside-a-macro-function/m-p/701272#M34</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-24T16:36:11Z</dc:date>
    </item>
  </channel>
</rss>

