<?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: dictionary.column in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79276#M22844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use PROC CONTENTS or the CONTENTS statement of DATASETS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see dictionary.columns wants too gather meta data from "everywhere" and then filter it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC CONTENTS will be much faster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2012 16:08:47 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2012-09-27T16:08:47Z</dc:date>
    <item>
      <title>dictionary.column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79275#M22843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SAS table, say A, with two columns with library names and sas datasets names&lt;/P&gt;&lt;P&gt;corresponding to some selected datasets on my SAS installation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIB&amp;nbsp; TABLE&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;lib1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tab1&lt;/P&gt;&lt;P&gt;lib1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tab2&lt;/P&gt;&lt;P&gt;lib2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tab3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, for instance, lib1.tab2 is a valid table name on my installation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to retrieve metadata for those tables using a proc sql&amp;nbsp; similar to the one below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT A.LIB, A.TABLE, B.NAME, B.TYPE, B.LENGTH &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM A &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT JOIN dictionary.columns B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON B.LIBNAME=strip(upcase(A.LIB)) and B.MEMNAME=strip(upcase(A.TABLE));&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works but it seems quite slow. Also, the log contains many messages such as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Data file XXX.DATA is in a format native to another&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host or the file encoding does not match the session encoding. Cross Environment Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with XXX being data files names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the message since I work with windows SAS and some&lt;/P&gt;&lt;P&gt;data files have been created under AIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do not understand is that it is displayed for data files that&lt;/P&gt;&lt;P&gt;are not referred to in the table A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that this query systematically parses every dataset from every libname&lt;/P&gt;&lt;P&gt;before taking into account the condition in the join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is ther a way to optimize this query in order to filter the data sets&lt;/P&gt;&lt;P&gt;before reading the associated data ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79275#M22843</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2012-09-27T16:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: dictionary.column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79276#M22844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use PROC CONTENTS or the CONTENTS statement of DATASETS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see dictionary.columns wants too gather meta data from "everywhere" and then filter it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC CONTENTS will be much faster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79276#M22844</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-09-27T16:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: dictionary.column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79277#M22845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I will do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is strange though that when I use the following query with&lt;/P&gt;&lt;P&gt;a table that has been created under AIX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT NAME, TYPE, LENGTH&lt;/P&gt;&lt;P&gt;FROM dictionary.columns&lt;/P&gt;&lt;P&gt;WHERE LIBNAME="somelib" and MEMNAME="somedata";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only get the previous message for the selected table.&lt;/P&gt;&lt;P&gt;It is like SAS prefilters the data only if a unique dataset is selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 20:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dictionary-column/m-p/79277#M22845</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2012-09-27T20:16:36Z</dc:date>
    </item>
  </channel>
</rss>

