<?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 parse multiple catalogs source code to find libname references (SAS 9.4) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828773#M327399</link>
    <description>&lt;P&gt;&lt;A href="https://support.sas.com/kb/23/187.html" target="_blank" rel="noopener"&gt;SAS Note 23187&lt;/A&gt; describes how you can print SOURCE and SCL catalog entries to external text files using PROC BUILD. You can then search the text files using SAS or other text search tools (Notepad++ is a good option). I assume that you would need SAS/AF installed and licensed to do this.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 23:33:06 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-08-15T23:33:06Z</dc:date>
    <item>
      <title>How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828657#M327345</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we need to identify the dependencies among 50 different catalogs in a SAS 9.4 environment (without SAS Studio, but with SAS Explorer).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, we would like to find all source code (scl, frame, screen, mainly) in our catalogs universe containing the path to the catalog named "gesco" ("/env/app/gesco").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the find function doesn't allow us to use this search criteria :&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-center" image-alt="2022-08-15 12_05_30-Window.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74428i100EE270710A2AD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2022-08-15 12_05_30-Window.jpg" alt="2022-08-15 12_05_30-Window.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another way to parse the catalog source code to query LIBNAME paths ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Wanda&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 10:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828657#M327345</guid>
      <dc:creator>adnavv</dc:creator>
      <dc:date>2022-08-15T10:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828662#M327348</link>
      <description>&lt;P&gt;Some code like below should give you the list of all entries belonging to a specific catalog. Requires of course that there is a libname that assigns the folder with the catalog to the SAS session.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table want as
  select *
  from dictionary.catalogs
  where memname='GESCO' and memtype='CATALOG'
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 10:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828662#M327348</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-15T10:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828679#M327352</link>
      <description>&lt;P&gt;Thank you Patrick, but with this query, I can only get &lt;U&gt;internal&lt;/U&gt; references to the catalog 'GESCO', although I know, for example, that&amp;nbsp;in the init.scl file of another catalog (named 'GESBA'), there is the following reference :&amp;nbsp;libname gesco&amp;nbsp;"/env/data/gesco": how can I retrieve it ? Do the dictionary tables contain such information ?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 14:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828679#M327352</guid>
      <dc:creator>adnavv</dc:creator>
      <dc:date>2022-08-15T14:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828683#M327353</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431580"&gt;@adnavv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you Patrick, but with this query, I can only get &lt;U&gt;internal&lt;/U&gt; references to the catalog 'GESCO', although I know, for example, that&amp;nbsp;in the init.scl file of another catalog (named 'GESBA'), there is the following reference :&amp;nbsp;libname gesco&amp;nbsp;"/env/data/gesco": how can I retrieve it ? Do the dictionary tables contain such information ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;See if you can do it with a data step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename src catalog 'mylib.gesba.init.scl';
data _null_;
  infile src;
  input;
  if find(_infile_,'gesco','i') then list;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 14:24:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828683#M327353</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-15T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828715#M327366</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431580"&gt;@adnavv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you Patrick, but with this query, I can only get &lt;U&gt;internal&lt;/U&gt; references to the catalog 'GESCO', although I know, for example, that&amp;nbsp;in the init.scl file of another catalog (named 'GESBA'), there is the following reference :&amp;nbsp;libname gesco&amp;nbsp;"/env/data/gesco": how can I retrieve it ? Do the dictionary tables contain such information ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Dictionary tables would only have the library if the library is active in the current session&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 16:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828715#M327366</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-15T16:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828767#M327395</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/431580"&gt;@adnavv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you Patrick, but with this query, I can only get &lt;U&gt;internal&lt;/U&gt; references to the catalog 'GESCO', although I know, for example, that&amp;nbsp;in the init.scl file of another catalog (named 'GESBA'), there is the following reference :&amp;nbsp;libname gesco&amp;nbsp;"/env/data/gesco": how can I retrieve it ? Do the dictionary tables contain such information ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS catalogues are stored in SAS proprietary binary files with extension .sas7bcat&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If you just want to search for all SAS catalog files then use a Unix &lt;EM&gt;find&lt;/EM&gt; command like &lt;EM&gt;find / -type f -name "*.sas7bcat" 2&amp;gt;/dev/null&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;If you want to find code that assigns libnames to folders containing "*.sas7bcat" files then combine the &lt;EM&gt;find&lt;/EM&gt; command with a &lt;EM&gt;grep&lt;/EM&gt;&amp;nbsp;to find all scripts with a path to a folder that contains a SAS catalog file. This will only give you a partial result though as there can also be pre-assigned libraries in SAS Metadata that contain catalogs.&lt;/LI&gt;
&lt;LI&gt;If you want to know what's IN the catalogues then generate libnames for all the folders where you find a *.sas7bcat file and then you can use the SAS dictionary tables and Proc Catalog for further investigation.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 22:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828767#M327395</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-15T22:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828773#M327399</link>
      <description>&lt;P&gt;&lt;A href="https://support.sas.com/kb/23/187.html" target="_blank" rel="noopener"&gt;SAS Note 23187&lt;/A&gt; describes how you can print SOURCE and SCL catalog entries to external text files using PROC BUILD. You can then search the text files using SAS or other text search tools (Notepad++ is a good option). I assume that you would need SAS/AF installed and licensed to do this.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 23:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828773#M327399</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-15T23:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828782#M327406</link>
      <description>&lt;P&gt;And there is also the filename&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lestmtsglobal/n0e720f80cp61wn1mplyz2xy2aeu.htm" target="_self"&gt;CATALOG Access Method&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 01:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828782#M327406</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-08-16T01:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828786#M327409</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp; - The CATALOG Access Method doesn't appear to work for SCL entries.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 03:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828786#M327409</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-16T03:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828805#M327419</link>
      <description>&lt;P&gt;Thank you for sharing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done a quick test with appending two catalogs source codes ('gesco', 'gesba'). The procedure has exported a total of 150 pages, which I still need to validate, but it may help me a lot.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&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-center" image-alt="2022-08-16 12_36_49-Window.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74454i07A69CFACC9F76C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-08-16 12_36_49-Window.jpg" alt="2022-08-16 12_36_49-Window.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 10:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828805#M327419</guid>
      <dc:creator>adnavv</dc:creator>
      <dc:date>2022-08-16T10:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse multiple catalogs source code to find libname references (SAS 9.4)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828990#M327492</link>
      <description>&lt;P&gt;We would need to extract the source code of each &lt;U&gt;&lt;FONT color="#000000"&gt;screen&lt;/FONT&gt;&amp;nbsp;&lt;/U&gt;belonging to each catalog (*.sas7bcat). It seems that the PROC BUILD doesn't allow to export the screen source code..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a another way to get it ?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 11:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-parse-multiple-catalogs-source-code-to-find-libname/m-p/828990#M327492</guid>
      <dc:creator>adnavv</dc:creator>
      <dc:date>2022-08-17T11:04:56Z</dc:date>
    </item>
  </channel>
</rss>

