<?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 list the library and table used in a program in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447813#M28973</link>
    <description>&lt;P&gt;Look at PROC SCAPROC - unfortunately it requires you to run the program to see what it’s doing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2018 15:09:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-03-22T15:09:33Z</dc:date>
    <item>
      <title>how to list the library and table used in a program</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447736#M28958</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On our server, we have many libraries as well as many tables into it.&amp;nbsp; Some of those tables will be modify in the coming month.&lt;/P&gt;&lt;P&gt;As I am a new employee (5 months)&amp;nbsp;and I am not familiar with all the sas programs and it became difficult to evaluate the impact of the table’s modifications on the existing programs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know if there is a nice way to identify the libraries used in a program as well as the tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to set a list of the tables consulted in our programs by libraries.&amp;nbsp; As we are informed about which tables will be modified, it will be easier to estimate the potential impacts of those tables’ updates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for in advanced for your help&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 12:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447736#M28958</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-03-22T12:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to list the library and table used in a program</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447773#M28965</link>
      <description>&lt;P&gt;If you are using SAS EG, i think there is no way to find out the libraries and the tables used int he program automatically, there is no in-built procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you can scan the whole code and find out which are the libraries and input or output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;other way could be to create a program which will read in your program as text file and create a dataset based on some keywords like - libname/filename/data/infile/merge etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this way you could have some rows in the temp dataset which will show which libraries are there and corresponding tables, but it won't work sure shot for all input/outputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Filename inp "&amp;lt;path and name of the sas code/&amp;gt;";

data temp;
infile inp;
input rec $100.;
if index(lowcase(rec), "libname") ne 0 then output; /*check libraries */&lt;BR /&gt;else if index(lowcase(rec),"filename") ne 0 then output; /*check input files*/&lt;BR /&gt;else if index(lowcase(rec),"data") ne 0 and index(rec,".") ne 0 then output; /* to check the permanent datasets */&lt;BR /&gt;else if index(lowcase(rec),"merge") ne 0 and index(rec,".") ne o then output; /*check permanent datasets used in merge*/
run;

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 13:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447773#M28965</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-03-22T13:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to list the library and table used in a program</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447778#M28967</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select libname,memname
 from dictionary.members
  where memtype='DATA';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Mar 2018 13:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447778#M28967</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-22T13:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to list the library and table used in a program</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447813#M28973</link>
      <description>&lt;P&gt;Look at PROC SCAPROC - unfortunately it requires you to run the program to see what it’s doing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 15:09:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/447813#M28973</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-22T15:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to list the library and table used in a program</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/448057#M28980</link>
      <description>Hi Ksharp,&lt;BR /&gt;&lt;BR /&gt;I think, we would have to run the program once to be able to use the dictionary tables.&lt;BR /&gt;&lt;BR /&gt;Also that program should be run in the new session, without any autoexec or autoallocated libraries, otherwise it would give list of all the datasets, not necessarily used in the program.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Manjeet</description>
      <pubDate>Fri, 23 Mar 2018 06:23:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-list-the-library-and-table-used-in-a-program/m-p/448057#M28980</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-03-23T06:23:24Z</dc:date>
    </item>
  </channel>
</rss>

