<?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: Ho to generate a list of tables and columns that are referenced by a SAS program in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525795#M5019</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254211"&gt;@UL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Suryakiran,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your reply. I'm trying to find the columns that are used. Not the available ones. I wonder whether it is possible to generate a list like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS Program name ABC uses&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;column&amp;nbsp;Database1.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column5&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table5.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database2.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;By database above are you referencing external database such as Oracle or Teradata? That would add some complexity depending on the database system and how you are referencing things.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 17:47:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-01-09T17:47:45Z</dc:date>
    <item>
      <title>How to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525713#M5001</link>
      <description>&lt;P&gt;Is there a way to generate a list of tables and columns that are referenced from SAS libraries? We've been generating these manually by scanning the SAS code but I am looking for a way how to do this programmatically.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:59:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525713#M5001</guid>
      <dc:creator>UL</dc:creator>
      <dc:date>2019-01-09T17:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525715#M5002</link>
      <description>Load your code into a dataset and search for keywords that indicate tables or columns.  Parse the lines for individual values.  That would be a start.</description>
      <pubDate>Wed, 09 Jan 2019 14:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525715#M5002</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-01-09T14:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525716#M5003</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to SAS Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to find the libraries and columns that your are using in your project or for the available ones? Querying the dictionary tables might be helpful (&lt;STRONG&gt;dictionary.tables&lt;/STRONG&gt; and &lt;STRONG&gt;dictionary.columns&lt;/STRONG&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525716#M5003</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-01-09T14:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525745#M5007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Suryakiran,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your reply. I'm trying to find the columns that are used. Not the available ones. I wonder whether it is possible to generate a list like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SAS Program name ABC uses&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;column&amp;nbsp;Database1.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table5.Column1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database2.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 15:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525745#M5007</guid>
      <dc:creator>UL</dc:creator>
      <dc:date>2019-01-09T15:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525747#M5008</link>
      <description>&lt;P&gt;Thanks Tom. Can this be done programmatically so that it populates a table, which has program name and table/column names used?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 15:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525747#M5008</guid>
      <dc:creator>UL</dc:creator>
      <dc:date>2019-01-09T15:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525752#M5009</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254211"&gt;@UL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Tom. Can this be done programmatically so that it populates a table, which has program name and table/column names used?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can use SCAPROC to some degree, but if a program is a macro for example, then you definitely cannot parse the code. Unfortunately work like this is only really accurate if done manually. You can do scans but since it's not 100% you need to do a lot of verification, which is more work IME.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 16:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525752#M5009</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-09T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525771#M5014</link>
      <description>&lt;P&gt;Thank you Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now looking at using the logging facility as an alternative to scanning the code. Do you think this approach is promising?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the documentation from SAS: &lt;A href="https://documentation.sas.com/?docsetId=logug&amp;amp;docsetTarget=p1ux9lxccgetcgn1hmkhm64m3ud0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=logug&amp;amp;docsetTarget=p1ux9lxccgetcgn1hmkhm64m3ud0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 16:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525771#M5014</guid>
      <dc:creator>UL</dc:creator>
      <dc:date>2019-01-09T16:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525781#M5017</link>
      <description>&lt;P&gt;Not likely. How are you planning to deal with variable and data set lists?&lt;/P&gt;
&lt;P&gt;Or macro code that generates dynamic variable or data set lists?&lt;/P&gt;
&lt;P&gt;EDIT: It really depends on how accurate you need this to be. If you're okay with a high level of error, say 25-30% then I think these would be fine. If you're doing a migration or transition plan/project, then no, this will not be sufficient.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can't program your way out of bad documentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254211"&gt;@UL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am now looking at using the logging facility as an alternative to scanning the code. Do you think this approach is promising?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the documentation from SAS: &lt;A href="https://documentation.sas.com/?docsetId=logug&amp;amp;docsetTarget=p1ux9lxccgetcgn1hmkhm64m3ud0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=logug&amp;amp;docsetTarget=p1ux9lxccgetcgn1hmkhm64m3ud0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525781#M5017</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-09T17:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525795#M5019</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254211"&gt;@UL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Suryakiran,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your reply. I'm trying to find the columns that are used. Not the available ones. I wonder whether it is possible to generate a list like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS Program name ABC uses&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;column&amp;nbsp;Database1.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table1.Column5&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database1.Schema1.Table5.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and&amp;nbsp;Database2.Schema1.Table1.Column1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;By database above are you referencing external database such as Oracle or Teradata? That would add some complexity depending on the database system and how you are referencing things.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525795#M5019</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-09T17:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ho to generate a list of tables and columns that are referenced by a SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525898#M5028</link>
      <description>&lt;P&gt;I don't think there is a straight forward approach for this, you may need to develop your own logic. Even though if you scan your .sas file, what if there is a select * program that selects all of the columns. Those columns names are not listed in the program but you are utilizing them.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 21:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-generate-a-list-of-tables-and-columns-that-are-referenced/m-p/525898#M5028</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-01-09T21:27:41Z</dc:date>
    </item>
  </channel>
</rss>

