<?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: Limiting MPRINTNEST option to latest 3 macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777657#M247439</link>
    <description>Thanks, Amir! Looks like post-processing will only be the way.</description>
    <pubDate>Mon, 01 Nov 2021 10:41:48 GMT</pubDate>
    <dc:creator>Ja5ya</dc:creator>
    <dc:date>2021-11-01T10:41:48Z</dc:date>
    <item>
      <title>Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777640#M247430</link>
      <description>&lt;P&gt;Hello, So I understand the&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;MPRINTNEST enables the macro-nesting information to be written to the SAS log in the MPRINT output. It prints out each and every macro that has been nested within a particular macro.&lt;BR /&gt;But what if a particular macro has almost 10/11 levels of nested macros within, the log gets too cluttered and troubleshooting gets way tough. Is there any way we can print out the nested macros in our log for only the latest 3 macros or some particular values of macros?&lt;BR /&gt;Please help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 05:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777640#M247430</guid>
      <dc:creator>Ja5ya</dc:creator>
      <dc:date>2021-11-01T05:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777643#M247431</link>
      <description>&lt;P&gt;With all due respect, anyone who nests SAS macros 10 or 11 deep needs their head read.There are far better ways to structure macro code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've never found the need to go beyond two or three levels maximum. MPRINTNEST is fine for two levels which should be 99 percent of the time, and adequate for three levels.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 05:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777643#M247431</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-11-01T05:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777644#M247432</link>
      <description>Yes, you are correct. But, we have such macros to handle large datasets. So it cannot be changed. Just wanted to know if such options are available in SAS.</description>
      <pubDate>Mon, 01 Nov 2021 07:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777644#M247432</guid>
      <dc:creator>Ja5ya</dc:creator>
      <dc:date>2021-11-01T07:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777648#M247434</link>
      <description>&lt;P&gt;You could try editing your macro to switch off the option at the start then switch it on again at the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, create a parameter in the macro that can be used to determine whether the option is on or off for the duration of the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 08:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777648#M247434</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2021-11-01T08:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777651#M247436</link>
      <description>Thanks, Amir, for your response. I did try putting the option in the middle so as to bypass the main macro. But looks like it's all or nothing. The main source of the macro is always being printed in my logs regardless of the position of the option which is not what I'm looking for.&lt;BR /&gt;Thanks again,&lt;BR /&gt;Jaya</description>
      <pubDate>Mon, 01 Nov 2021 09:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777651#M247436</guid>
      <dc:creator>Ja5ya</dc:creator>
      <dc:date>2021-11-01T09:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777656#M247438</link>
      <description>&lt;P&gt;In that case, have you considered some post-processing, by creating a utility to read the log and create another log file where the nests that you don't want are removed, as they should be identifiable by "MPRINT (MACRO_NAME)", e.g., from the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p09skykl2erwkyn1xh90vqmmcrgy.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MPRINT(OUTER):   data _null_;
MPRINT(OUTER.INNER):   put
MPRINT(OUTER.INNER.INRMOST):   'This is the text of the PUT statement'
MPRINT(OUTER.INNER):  ;
MPRINT(OUTER):   run;
This is the text of the PUT statement
NOTE: DATA statement used (Total process time):
      real time           0.10 seconds
      cpu time            0.06 seconds&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 10:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777656#M247438</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2021-11-01T10:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777657#M247439</link>
      <description>Thanks, Amir! Looks like post-processing will only be the way.</description>
      <pubDate>Mon, 01 Nov 2021 10:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777657#M247439</guid>
      <dc:creator>Ja5ya</dc:creator>
      <dc:date>2021-11-01T10:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting MPRINTNEST option to latest 3 macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777677#M247451</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349550"&gt;@Ja5ya&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes, you are correct. But, we have such macros to handle large datasets. So it cannot be changed. Just wanted to know if such options are available in SAS.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The size of the data has nothing to do with the complexity of the code that is needed to deal with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either do not use the nested printing option. Or spend the time to change your code.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 13:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Limiting-MPRINTNEST-option-to-latest-3-macros/m-p/777677#M247451</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-01T13:39:33Z</dc:date>
    </item>
  </channel>
</rss>

