<?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: Identify given variable from multiple libraries &amp;amp; tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418964#M280435</link>
    <description>&lt;P&gt;Yeah, the dictionary tables are cumbersome when connected to databases.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try PROC DATASETS/PROC CONTENTS instead but you may have to do a loop over all your libraries. If you only have a few that's fine but if you have a lot that's just a little more work.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2017 21:28:59 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-12-06T21:28:59Z</dc:date>
    <item>
      <title>Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418857#M280431</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone could suggest an approach to solve the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-From multiple libraries;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-scan each table from each library;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Flag if find variable 'ID_Number';&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;-Return location of each match (libname.table_name).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, i'm looking for a given variable without knowing in which library or table it is located.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 16:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418857#M280431</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-12-06T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418862#M280432</link>
      <description>&lt;P&gt;Use the SASHELP.VCOLUMN table. It has a list of all the data sets and the variables in them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would return all entries with the variable Age, including the library, data set name and the variable type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set sashelp.vcolumn;

where upcase(name) = 'AGE';&lt;BR /&gt;&lt;BR /&gt;keep libname memname name type;
run;&lt;/CODE&gt;&lt;/PRE&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/64767"&gt;@brulard&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If someone could suggest an approach to solve the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-From multiple libraries;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-scan each table from each library;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Flag if find variable 'ID_Number';&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;-Return location of each match (libname.table_name).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, i'm looking for a given variable without knowing in which library or table it is located.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 16:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418862#M280432</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-06T16:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418870#M280433</link>
      <description>&lt;P&gt;thanks for pointing me in the right direction, running the code now&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418870#M280433</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-12-06T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418947#M280434</link>
      <description>&lt;P&gt;... so the query ended after 3 1/2 hour. I unfortunately received repeated ERROR messages (related to different hadoop schemas?). I will&amp;nbsp;consult with&amp;nbsp;our IT team to learn more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if is related to my needing to instead code the query in sql. Thanks Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message:&amp;nbsp;ERROR: java.sql.SQLException: Could not establish connection to&lt;BR /&gt;jdbc:hive2://sdpsvrwm8888.xxxxx.ad.xxxxxxx.com:8443/cmstr;ssl=true;sslTrustStore=/sa&lt;BR /&gt;shome/hadoop/gateway.jks;trustStorePassword=xxxxxx?hive.server2.transport.mode=http;hive.ser&lt;BR /&gt;ver2.thrift.http.path=gateway/default/hive: HTTP Response code: 500&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 20:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418947#M280434</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-12-06T20:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418964#M280435</link>
      <description>&lt;P&gt;Yeah, the dictionary tables are cumbersome when connected to databases.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try PROC DATASETS/PROC CONTENTS instead but you may have to do a loop over all your libraries. If you only have a few that's fine but if you have a lot that's just a little more work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 21:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418964#M280435</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-06T21:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Identify given variable from multiple libraries &amp; tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418994#M280436</link>
      <description>&lt;P&gt;You might check with you DB Admin (or google ) to see which tools the database supports and use PASSTHROUGH SQL instead of SAS code to use the tools. Most databases have some equivalent of dictionary tables. So you would need to know which tables and the names of the variables to look at.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Though "library" starts getting a tad fuzzy with multiple remote databases.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 23:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-given-variable-from-multiple-libraries-amp-tables/m-p/418994#M280436</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-06T23:28:58Z</dc:date>
    </item>
  </channel>
</rss>

