<?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 could I count big macro running time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446508#M283242</link>
    <description>&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Mar 2018 23:01:50 GMT</pubDate>
    <dc:creator>xiangpang</dc:creator>
    <dc:date>2018-03-17T23:01:50Z</dc:date>
    <item>
      <title>how could I count big macro running time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446489#M283240</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to compare the running time difference of a large MACRO with several different small macro.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example. one is %macro A and another is %micro B. what code I should use and where I should input?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;%micro A;
  %micro bb;
        %micro ccc;
         %mend ccc;
  %mend bb;
%mend A;


%micro B;
  %micro bb;
        %micro ccc;
            %micro dddd;
            %mend dddd;
         %mend ccc;
  %mend bb;
%mend B;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Mar 2018 22:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446489#M283240</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-17T22:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: how could I count big macro running time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446501#M283241</link>
      <description>&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2015/01/21/sas-timer-the-key-to-writing-efficient-sas-code/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2015/01/21/sas-timer-the-key-to-writing-efficient-sas-code/&lt;/A&gt;&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/194581"&gt;@xiangpang&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I want to compare the running time difference of a large MACRO with several different small macro.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example. one is %macro A and another is %micro B. what code I should use and where I should input?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;%micro A;
  %micro bb;
        %micro ccc;
         %mend ccc;
  %mend bb;
%mend A;


%micro B;
  %micro bb;
        %micro ccc;
            %micro dddd;
            %mend dddd;
         %mend ccc;
  %mend bb;
%mend B;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Mar 2018 22:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446501#M283241</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-17T22:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: how could I count big macro running time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446508#M283242</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Mar 2018 23:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446508#M283242</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-17T23:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: how could I count big macro running time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446660#M283243</link>
      <description>&lt;P&gt;I think you got an answer to your question but the code you posted is very puzzling. It seems to show marco DEFINITIONS nested inside of each other.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should NEVER do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can call another macro inside of a macro, so that when it runs they are nested.&amp;nbsp; But the store of compiled macros is a flat directory.&amp;nbsp; At any point in time you can only have one macro named CCC.&amp;nbsp; You cannot have one defined inside of A and a different one that is defined only when B is running.&amp;nbsp; &amp;nbsp;If you compile a new definition of CCC it overwrites the previous definition of CCC.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro A;
  %put Inside A;
  %bb;
  %put Back to A;
%mend A;
%macro bb;
  %put Inside BB;
  %ccc;
  %put Back to BB;
%mend bb;
%macro ccc;
  %put Inside CCC ;
%mend ccc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;317  %A;
Inside A
Inside BB
Inside CCC
MPRINT(BB):  ;
Back to BB
MPRINT(A):  ;
Back to A&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 02:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446660#M283243</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-19T02:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: how could I count big macro running time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446665#M283244</link>
      <description>Sorry for the confuse. I run macroA and macroB in different dataset at different time. Thanks for the comment. I am still a beginner and thanks for teaching.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Mar 2018 03:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-could-I-count-big-macro-running-time/m-p/446665#M283244</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-03-19T03:28:37Z</dc:date>
    </item>
  </channel>
</rss>

