<?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: Session compiled macro catalog in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77944#M16891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I am looking for user compiled macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 19:55:12 GMT</pubDate>
    <dc:creator>Jakkas</dc:creator>
    <dc:date>2013-09-10T19:55:12Z</dc:date>
    <item>
      <title>Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77942#M16889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I see information about all session compiled macros?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 17:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77942#M16889</guid>
      <dc:creator>Jakkas</dc:creator>
      <dc:date>2013-09-10T17:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77943#M16890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to know the names of the automatic compiled ones ... look in the catalog present in saswork&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 19:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77943#M16890</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-09-10T19:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77944#M16891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I am looking for user compiled macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 19:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77944#M16891</guid>
      <dc:creator>Jakkas</dc:creator>
      <dc:date>2013-09-10T19:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77945#M16892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please explain me the difference or your intention of your question.&lt;/P&gt;&lt;P&gt;Macros can be pre-compiled by users and by options getting used. &lt;BR /&gt;Autocall macros being used user/session are getting compiled and by that the compiled version gets stored in that catalog.&lt;/P&gt;&lt;P&gt;Manually compiling of macros is also possible&amp;nbsp; by using the %inc statement or defining them in-stream in other code. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 20:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77945#M16892</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-09-10T20:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77946#M16893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC CATALOG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 20:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77946#M16893</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-09-10T20:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77947#M16894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If not explicitly defined different then session specific macros get compiled into a catalog in WORK. I believe the catalog name is sasmacr. Use Proc Catalog to list it's content.&lt;/P&gt;&lt;P&gt;I believe there is also a sashelp table listing compiled macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 22:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77947#M16894</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-09-10T22:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77948#M16895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data macros;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.vcatalg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where libname='WORK' and memname='SASMACR'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and memtype='CATALOG' and objtype='MACRO';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 23:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77948#M16895</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-09-10T23:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77949#M16896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following doesn't work. It gives an error saying wor.SASMACR doesn't exist. So I don't see a way to see the session compiled macros using PROC CATALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc catalog cat=work.sasmacr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contents out=temp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SASHELP.VCATALG Does show me all the session compiled macros. But I am not able to delete a macro from it. So how would you delete a session compiled macro from work.SASMACR? If I could get to the catalog from PROC Catalog I could use delete statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 16:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77949#M16896</guid>
      <dc:creator>Jakkas</dc:creator>
      <dc:date>2013-09-11T16:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77950#M16897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on what you mean by "session".&amp;nbsp; When you run SAS directly from the operating system it uses WORK.SASMACR catalog.&amp;nbsp; But a few years ago when playing with Enterprise Guide I found it was using WORK.SASMAC1 instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this little program to take a snapshot from the metadata before and after compiling a macro and see what changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;create table before as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select libname,memname,objname,created from dictionary.catalogs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where objtype='MACRO'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; order by 1,2,3&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test2; %mend ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table after as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select libname,memname,objname,created from dictionary.catalogs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where objtype='MACRO'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; order by 1,2,3&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc compare data=before compare=after listall ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id libname memname objname;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/36/360.html" title="http://support.sas.com/kb/36/360.html"&gt;36360 - How to determine whether a macro exists within a SAS session&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 18:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77950#M16897</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-09-11T18:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Session compiled macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77951#M16898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom. So what I was missing was that it is called SASMAC1 instead of SASMACR. Here is how I am able to uncompile a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Macro MyMacro1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;SYSMACRONAME. says Shazzam; &lt;BR /&gt;%Mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%myMacro1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Runs fine. */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc catalog cat=work.SASMAC1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contents out=temp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Shows that myMacro1 is in the work macro catalog. */&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc catalog cat=Work.SASMAC1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete MyMacro1 (ET=MACRO);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Deletes myMacro1 from work macro catalog. */&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%myMacro1&amp;nbsp; /* Error. the macro definition is no longer available. */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 19:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Session-compiled-macro-catalog/m-p/77951#M16898</guid>
      <dc:creator>Jakkas</dc:creator>
      <dc:date>2013-09-11T19:17:59Z</dc:date>
    </item>
  </channel>
</rss>

