<?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: List sas datasets within a library when encrypted in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339731#M77539</link>
    <description>&lt;P&gt;You may want to use dicitonary.tables as it has much more information about the tables.&lt;/P&gt;
&lt;P&gt;This will show what you can find out about the datasets:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   describe table dictionary.tables;
quit;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Mar 2017 18:16:08 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-03-09T18:16:08Z</dc:date>
    <item>
      <title>List sas datasets within a library when encrypted</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339573#M77486</link>
      <description>&lt;P&gt;Is it possible to&amp;nbsp;create a list of datasets within a SAS library when those datasets have been encrypted?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt; create table work.listout as select * from sashelp.vtable&lt;BR /&gt; where upcase(libname) = "STORE" and upcase(memname) contains upcase("&amp;amp;user_reference.")&lt;BR /&gt; order by modate asc&lt;BR /&gt; ;&lt;BR /&gt; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And encryption code here:-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data store.&amp;amp;fname. (ENCRYPT=AES ENCRYPTKEY=&amp;amp;pwdit.);&lt;BR /&gt;set datafile_values_raw;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 10:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339573#M77486</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2017-03-09T10:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: List sas datasets within a library when encrypted</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339579#M77491</link>
      <description>&lt;P&gt;When using SQL, it's better to access dictionary.tables directly instead of through the view sashelp.vtable. The view reads all datasets in all currently assigned libraries before SQL can apply the where condition.&lt;/P&gt;
&lt;P&gt;When using dictionary.tables, the where condition is immediately used so only the subset of datasets is accessed, making it much more performant when you have lots of datasets in your libraries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, I can't test your code as I don't have SAS/SECURE licensed. If your select fails because of encrypted datasets, you could try to extract the pathname from the library and use OS commands to get a directory listing. You won't get metadata about the structure and number of obs, but you can still get the physical size, owner, OS permissions and modification/access timestamps.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 10:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339579#M77491</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-09T10:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: List sas datasets within a library when encrypted</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339580#M77492</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the DICTIONARY.MEMBERS dictionary table to list the SAS datasets. Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc delete data=work.enc;
run;

data work.enc (ENCRYPT=aes encryptkey=sugus);
  set sashelp.class;
run;

proc sql noprint;
  create table work.members as
  select * from dictionary.members
  where libname = "WORK"
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to use the AES encryption, then I would recommend to use &lt;A href="http://support.sas.com/documentation/cdl/en/seclibag/66930/HTML/default/viewer.htm#titlepage.htm" target="_blank"&gt;Metadata Bound Libraries&lt;/A&gt;. Using the MBL you will never have to use the password in your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 10:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339580#M77492</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-03-09T10:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: List sas datasets within a library when encrypted</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339603#M77503</link>
      <description>&lt;P&gt;This works but doesn't return the timestamp for the dataset - date created is&amp;nbsp;contained within the dataset name&amp;nbsp;though so that can be used to sort and dedupe and retain the most recent verison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 12:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339603#M77503</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2017-03-09T12:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: List sas datasets within a library when encrypted</title>
      <link>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339731#M77539</link>
      <description>&lt;P&gt;You may want to use dicitonary.tables as it has much more information about the tables.&lt;/P&gt;
&lt;P&gt;This will show what you can find out about the datasets:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   describe table dictionary.tables;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 18:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/List-sas-datasets-within-a-library-when-encrypted/m-p/339731#M77539</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-09T18:16:08Z</dc:date>
    </item>
  </channel>
</rss>

