<?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 to remove specfic macros stored as catalogs in sas macro catalog in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948928#M371239</link>
    <description>&lt;P&gt;You can accomplish this with PROC CATALOG. Do you have SAS Enterprise Guide? The Catalog and Formats Explorer (in the Tools menu) can help generate this code for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1729786799487.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101780iC44969AB45C3AB30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1729786799487.png" alt="ChrisHemedinger_0-1729786799487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2024 16:20:28 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2024-10-24T16:20:28Z</dc:date>
    <item>
      <title>How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948920#M371235</link>
      <description>&lt;P&gt;I have a sas macro catalog named test. This catalog contains list of macros (stored as catalogs). I want to remove specific catalogs from test. Is there a way to do in SAS?&lt;/P&gt;
&lt;P&gt;For example&amp;nbsp; test contains A,B,C ,V_A,V_B,V_C.I want to keep only A,B,C.&lt;/P&gt;
&lt;P&gt;Appreciate your response.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 15:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948920#M371235</guid>
      <dc:creator>sri1</dc:creator>
      <dc:date>2024-10-24T15:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948928#M371239</link>
      <description>&lt;P&gt;You can accomplish this with PROC CATALOG. Do you have SAS Enterprise Guide? The Catalog and Formats Explorer (in the Tools menu) can help generate this code for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1729786799487.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101780iC44969AB45C3AB30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1729786799487.png" alt="ChrisHemedinger_0-1729786799487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 16:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948928#M371239</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2024-10-24T16:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948997#M371269</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/80196"&gt;@sri1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a sas macro catalog named test. This catalog contains list of macros (stored as catalogs). I want to remove specific catalogs from test. Is there a way to do in SAS?&lt;/P&gt;
&lt;P&gt;For example&amp;nbsp; test contains A,B,C ,V_A,V_B,V_C.I want to keep only A,B,C.&lt;/P&gt;
&lt;P&gt;Appreciate your response.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your terminology is messed up.&amp;nbsp; The catalog cannot contain other catalogs.&amp;nbsp;A "macro catalog" usually means a SAS catalog file that contains compiled macros.&amp;nbsp; The object (or entry) type for a compiled macro is 'MACRO'.&amp;nbsp; The object name is the macro's name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use PROC CATALOG to manage catalog entries.&amp;nbsp; Use the SAVE command if you want to delete all but the listed entries.&amp;nbsp; So if your catalog name is MYLIB.MYMACROS then the code would look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc catalog cat=MYLIB.MYMACROS entrytype=macro;
  save a b c ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 03:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/948997#M371269</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-25T03:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949014#M371279</link>
      <description>&lt;P&gt;Thanks for your response,am using sas 9.4&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 08:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949014#M371279</guid>
      <dc:creator>sri1</dc:creator>
      <dc:date>2024-10-25T08:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949022#M371285</link>
      <description>&lt;P&gt;Thanks for your response. There are numerous macros with prefix V_ , is there a way I can delete all the macros with prefix V_&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 09:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949022#M371285</guid>
      <dc:creator>sri1</dc:creator>
      <dc:date>2024-10-25T09:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949031#M371288</link>
      <description>&lt;P&gt;You can build the list of macros to delete using PROC SQL and the SASHELP.VCATALG list, then use that list in PROC CATALOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's assume your macros are in a catalog named MYMACROS within the library MYLIB, and you want to catch the "V_*" named macros:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc sql noprint;
 select objname into: vmacs separated by ' ' from sashelp.vcatalg
 where substr(objname,1,2) = "V_" and libname='MYLIB' and memname='MYMACROS'
and objtype='MACRO';
quit;

/* space-delimited list of matching macro names */
%put &amp;amp;=vmacs;

proc catalog
  cat=MYLIB.MYMACROS entrytype=macro;
  delete &amp;amp;vmacs.;
run;
quit;
 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 12:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949031#M371288</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2024-10-25T12:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove specfic macros stored as catalogs in sas macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949080#M371313</link>
      <description>&lt;P&gt;Appreciate your response, thanks&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 03:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-specfic-macros-stored-as-catalogs-in-sas-macro/m-p/949080#M371313</guid>
      <dc:creator>sri1</dc:creator>
      <dc:date>2024-10-26T03:28:59Z</dc:date>
    </item>
  </channel>
</rss>

