<?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 Macro within a macro in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425535#M4284</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I coded a macro which I then invoked in a second macro like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro evtstudy(industry,start,end,number);

/*....*/ 

%mend evtstudy;

/*Evoke event study macro for different industries and event windows*/
%macro evtrun (industry);
	%evtstudy (&amp;amp;industry.,-2,3,1);	
%mend evtrun;

%evtrun(aerodef);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Before I changed it into a macro everything worked fine but now I always get the error&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 485: ROW and COLUMN could not be determined.
 NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I wonder if it is because how I invoked the macro inside the other macro?&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jan 2018 21:34:01 GMT</pubDate>
    <dc:creator>Annalena</dc:creator>
    <dc:date>2018-01-06T21:34:01Z</dc:date>
    <item>
      <title>Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425535#M4284</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I coded a macro which I then invoked in a second macro like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro evtstudy(industry,start,end,number);

/*....*/ 

%mend evtstudy;

/*Evoke event study macro for different industries and event windows*/
%macro evtrun (industry);
	%evtstudy (&amp;amp;industry.,-2,3,1);	
%mend evtrun;

%evtrun(aerodef);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Before I changed it into a macro everything worked fine but now I always get the error&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 485: ROW and COLUMN could not be determined.
 NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I wonder if it is because how I invoked the macro inside the other macro?&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 21:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425535#M4284</guid>
      <dc:creator>Annalena</dc:creator>
      <dc:date>2018-01-06T21:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425536#M4285</link>
      <description>&lt;P&gt;Invoking a macro within another macro is fine, and often a good idea.&amp;nbsp; That sort of message is hard to debug, but the problem should be somewhere within your code (could be missing semicolon sometimes?).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below example code runs fine:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro evtstudy(industry,start,end,number);
  %put macro EVTSTUDY running &amp;amp;=industry &amp;amp;=start &amp;amp;=end &amp;amp;=number  ;
%mend evtstudy;

%macro evtrun (industry);
  %put macro EVTRUN running &amp;amp;=industry ;
	%evtstudy (&amp;amp;industry.,-2,3,1);	
%mend evtrun;

%evtrun(aerodef)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Logs is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;34   %evtrun(aerodef)
macro EVTRUN running INDUSTRY=aerodef
macro EVTSTUDY running INDUSTRY=aerodef START=-2 END=3 NUMBER=1
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 22:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425536#M4285</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-01-06T22:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425537#M4286</link>
      <description>&lt;P&gt;Calling a macro from another macro is not a problem.&amp;nbsp; I do it all the time.&amp;nbsp; You must be doing something else wrong.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OPTIONS MPRINT;&lt;/P&gt;
&lt;P&gt;and lots of other debugging options can help you debug.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 22:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425537#M4286</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-01-06T22:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425540#M4287</link>
      <description>&lt;P&gt;Try running again after turning on SPOOL option&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OPTIONS SPOOL;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 22:24:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425540#M4287</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-06T22:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425543#M4288</link>
      <description>&lt;P&gt;I reckon it might be the use of comment strings like /*----*/ in the macro causing issues. Change to the macro comment style: %*------;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 22:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425543#M4288</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-06T22:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425544#M4289</link>
      <description>&lt;P&gt;Actually, /* */ comments are fine in a macro. I use them all the time.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 22:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425544#M4289</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-01-06T22:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro within a macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425545#M4290</link>
      <description>&lt;P&gt;Hey everybody, thank you for your answers!&lt;BR /&gt;It was actually a way simpler problem. Im invoking this macro for about 100 data sets, but had forgotten one of them in the import macro.. obviously SAS can't compute anything then.. I didn't see this before because SAS Studio didn't show the whole log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, Im still a beginner. &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2018 23:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-within-a-macro/m-p/425545#M4290</guid>
      <dc:creator>Annalena</dc:creator>
      <dc:date>2018-01-06T23:03:29Z</dc:date>
    </item>
  </channel>
</rss>

