<?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: recalling macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25147#M4345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds more like the macro is not cleaning up.&amp;nbsp; Perhaps it is leaving a file open?&lt;/P&gt;&lt;P&gt;Perhaps if you stick end extra semi-colons after the macro call so that SAS knows that it shouldn't look of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the macro source code. Does it include anY statements before the %MACRO or after the %MEND ?&amp;nbsp; If so then those statements will only work the first time you compile the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to recompile the macro you can just include it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthnight;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthBMT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2011 17:50:07 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-10-07T17:50:07Z</dc:date>
    <item>
      <title>recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25143#M4341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;A basic question regarding mrecall of macros-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK I have a program that calls all these macros-&lt;/P&gt;&lt;P&gt;%monthday &lt;/P&gt;&lt;P&gt; %monthnight&lt;/P&gt;&lt;P&gt;&amp;nbsp; %monthBMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within each of the macros I run another macro called %UNITSPEC that essentially does the same thing to each of the programs above but with some minor changes in the underlying query-&lt;/P&gt;&lt;P&gt;However after the first program runs, it crashes out on me-log output follows as below-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do have within each program above- &lt;/P&gt;&lt;P&gt;filename hhmacros "\\Fpmcb11\InfectionControl\sasprograms\MACROS\HH";&lt;/P&gt;&lt;P&gt;options mrecall mautosource sasautos=(hhmacros&amp;nbsp; sasautos) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to recall the macros each time. Is this necessary?&lt;/P&gt;&lt;P&gt;Thanks again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="html" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR:Windows Error Reporting failed because the client was not found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR:&amp;nbsp; Read Access Violation In Task [ Submit ]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;Exceptionoccurred at (016F9DBA)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;TaskTraceback&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;Address&amp;nbsp;&amp;nbsp; Frame&amp;nbsp;&amp;nbsp;&amp;nbsp; (DBGHELP API Version 4.0 rev 5)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;016F9DBA&amp;nbsp; 0852D6FC sashost:Main+0xE37F6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;0164D839&amp;nbsp; 0852D970 sashost:Main+0x37275&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;01655CC8&amp;nbsp; 0852D9C0 sashost:Main+0x3F704&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;674917BE&amp;nbsp; 0852DA20 sasxzcrp:mcn_main+0x7BE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;671F2984&amp;nbsp; 0852DA4C sasxmac:mcn_main+0x1984&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023E5B43&amp;nbsp; 0852FB38 sasxshel:mcn_main+0x4B43&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023E51BE&amp;nbsp; 0852FB54 sasxshel:mcn_main+0x41BE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;02406DE6&amp;nbsp; 0852FB84 sasxshel:mcn_main+0x25DE6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;02406C12&amp;nbsp; 0852FB9C sasxshel:mcn_main+0x25C12&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;02404F81&amp;nbsp; 0852FC28 sasxshel:mcn_main+0x23F81&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023F0725&amp;nbsp; 0852FC58 sasxshel:mcn_main+0xF725&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023F4250&amp;nbsp; 0852FCA8 sasxshel:mcn_main+0x13250&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023FEA6E&amp;nbsp; 0852FCE0 sasxshel:mcn_main+0x1DA6E&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;023FC92F&amp;nbsp; 0852FD64 sasxshel:mcn_main+0x1B92F&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;0241CE05&amp;nbsp; 0852FEF8 sasxshel:mcn_main+0x3BE05&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;02420169&amp;nbsp; 0852FF6C sasxshel:mcn_main+0x3F169&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;02420C9E&amp;nbsp; 0852FF8C sasxshel:mcn_main+0x3FC9E&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;01622854&amp;nbsp; 0852FFA0 sashost:Main+0xC290&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;0170F038&amp;nbsp; 0852FFB4 sashost:Main+0xF8A74&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;7C80B729&amp;nbsp; 0852FFEC kernel32:GetModuleFileNameA+0x1BA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;ERROR: Generic criticalerror&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 21:59:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25143#M4341</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2011-10-06T21:59:01Z</dc:date>
    </item>
    <item>
      <title>recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25144#M4342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry about the error message that did not print right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 21:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25144#M4342</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2011-10-06T21:59:33Z</dc:date>
    </item>
    <item>
      <title>recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25145#M4343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need not to recall macro.&lt;/P&gt;&lt;P&gt;Using options mrecall is because SAS&amp;nbsp; defaultly search macro only once in these libraries( hhmacros&amp;nbsp; sasautos ).&lt;/P&gt;&lt;P&gt;So mrecall can force SAS to search macro many times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you can run your macro at SAS, The error maybe is your macro has some problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 06:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25145#M4343</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-10-07T06:57:13Z</dc:date>
    </item>
    <item>
      <title>recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25146#M4344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KSharp;&lt;/P&gt;&lt;P&gt;The macro does work perfectly in all the programs if I run them separately-&lt;/P&gt;&lt;P&gt;The first one works w/o incident, but then when it comes to the second one, &lt;/P&gt;&lt;P&gt;it gives this error- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NOTE: Autocall member, UNITSPEC, has not been compiled by the macro processor. It may contain a macro syntax error&lt;/P&gt;&lt;P&gt;or not define a macro with the same name as the member. To autocall this member again, set OPTION MRECALL.&lt;/P&gt;&lt;P&gt;ERROR: Windows Error Reporting failed because the client was not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Read Access Violation In Task [ Submit ]&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;I have option MRECALL set into each macro but perhaps I need to set it differently? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Thanks. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Thanks again. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Lawrence &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 17:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25146#M4344</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2011-10-07T17:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25147#M4345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds more like the macro is not cleaning up.&amp;nbsp; Perhaps it is leaving a file open?&lt;/P&gt;&lt;P&gt;Perhaps if you stick end extra semi-colons after the macro call so that SAS knows that it shouldn't look of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the macro source code. Does it include anY statements before the %MACRO or after the %MEND ?&amp;nbsp; If so then those statements will only work the first time you compile the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to recompile the macro you can just include it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthnight;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%inc hhmacros(unitspec);&lt;/P&gt;&lt;P&gt;%monthBMT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 17:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25147#M4345</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-10-07T17:50:07Z</dc:date>
    </item>
    <item>
      <title>recalling macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25148#M4346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;That works! Thank you!&lt;/P&gt;&lt;P&gt;Lawrence &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 19:02:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/recalling-macros/m-p/25148#M4346</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2011-10-07T19:02:50Z</dc:date>
    </item>
  </channel>
</rss>

