<?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: Problem running a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560867#M156919</link>
    <description>&lt;P&gt;1h searching for an answer and I think that is because i don't put :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro1 ;&lt;/P&gt;&lt;P&gt;%macro2 ;&lt;/P&gt;&lt;P&gt;%macro3 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I come back tomorrow ..&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2019 14:55:04 GMT</pubDate>
    <dc:creator>Onizuka</dc:creator>
    <dc:date>2019-05-22T14:55:04Z</dc:date>
    <item>
      <title>Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560862#M156916</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some troubles for run a macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I put several macros (that work) in a big macro and I tried to run it but nothing is happening ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have check :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- the comments (all my comments are like /* my comment */ )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I have try to close SAS and open again but still not working&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- names of each macro it's ok, like :&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Macro BIG_ONE ;

  %Macro macro1 ;
  /* ..... */
  %Mend macro1 ;

  %Macro macro2 ;
  /* ...... */
  %Mend macro2 ;

  %Macro macro3 ;
  /* ... */
  %Mend macro3 ;

%Mend BIG_ONE ;

%BIG_ONE ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV class="oSioSc"&gt;&lt;DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;I put the options mprint, mlogic and symbolgen and I don't see any problem on the log (I have watched every line of the log one by one).&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;Someone has an idea ?&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;Thank you a lot !&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;Onizuka&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;PS : Sorry for my english..&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gsrt tw-ta-container tw-nfl"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 May 2019 14:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560862#M156916</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-05-22T14:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560865#M156918</link>
      <description>&lt;P&gt;All you did was define a bunch of macros.&amp;nbsp; I do not see any statements that would call any of them.&lt;/P&gt;
&lt;P&gt;There is no reason to define macros inside of other macros.&amp;nbsp; The name space for compiled macros is flat so whether you define MACRO1 inside of BIG_ONE or outside of BIG_ONE there can only ever be one compiled version of MACRO1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This type of structure is more logical.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Macro macro1 ;
  /* ..... */
%Mend macro1 ;

%Macro macro2 ;
  /* ...... */
%Mend macro2 ;

%Macro macro3 ;
  /* ... */
%Mend macro3 ;

%Macro BIG_ONE ;

%macro1;
%macro2;
%macro3;

%Mend BIG_ONE ;

%big_one;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now when you call %BIG_ONE it calls the other three macros in sequence.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560865#M156918</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-22T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560867#M156919</link>
      <description>&lt;P&gt;1h searching for an answer and I think that is because i don't put :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro1 ;&lt;/P&gt;&lt;P&gt;%macro2 ;&lt;/P&gt;&lt;P&gt;%macro3 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I come back tomorrow ..&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:55:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560867#M156919</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-05-22T14:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560868#M156920</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;All you did was define a bunch of macros.&amp;nbsp; I do not see any statements that would call any of them.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, it is what I thought.. &lt;SPAN&gt;We must believe that at the end of the day it becomes difficult lol&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560868#M156920</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-05-22T14:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560869#M156921</link>
      <description>&lt;P&gt;what do you mean nothing is happening? nothing is mentioned in the macro except comments so what you expecting to happen?&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:56:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560869#M156921</guid>
      <dc:creator>kulbshar</dc:creator>
      <dc:date>2019-05-22T14:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560870#M156922</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You're right, what I wanted to do is nonsense, so I removed the "BIG_ONE" and added a code which directly run all the macros like :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Macro RUN_GESTION_RECUL (typequest =) ;

	%local i ;
	%do i = 1 %to %sysfunc(countw(&amp;amp;typequest));
		%let nextvar = %scan(&amp;amp;typequest,&amp;amp;i.);

		%comptage_niveau   ;
		%calcul_periode    ;
		%traitement_recul  ;
		%ajout_niveau_base ;

	%end ;

%Mend RUN_GESTION_RECUL ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 15:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-running-a-macro/m-p/560870#M156922</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-05-22T15:01:46Z</dc:date>
    </item>
  </channel>
</rss>

