<?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: All datasets of a library with access permission in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513798#M2585</link>
    <description>&lt;P&gt;Perhaps the dictionary.table_constraints can be of help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table test as
   select * from dictionary.table_constraints
   where libname='SomeLibname';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Nov 2018 07:24:51 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-11-16T07:24:51Z</dc:date>
    <item>
      <title>All datasets of a library with access permission</title>
      <link>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513546#M2551</link>
      <description>&lt;DIV class="result-shield-container tlid-copy-target"&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;I need some way to show all the datasets of a library showing the access permission of each dataset&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="result-shield-container tlid-copy-target"&gt;like but adding access permission:&lt;/DIV&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;datasets&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;library&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=inf;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;like:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;# Name Member Type File Size Last Modified Access Permission&lt;BR /&gt;1 DS1 DATA 2MB 10/22/2018 12:54:50 rw-rw-r--&lt;BR /&gt;2 DS2 DATA 1MB 10/22/2018 12:54:50 rw-rw-r--&lt;BR /&gt;3 DS3 DATA 1MB 10/22/2018 12:54:50 rw-rw-r-- &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible? thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 19:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513546#M2551</guid>
      <dc:creator>Angel_Saenz</dc:creator>
      <dc:date>2018-11-15T19:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: All datasets of a library with access permission</title>
      <link>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513798#M2585</link>
      <description>&lt;P&gt;Perhaps the dictionary.table_constraints can be of help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table test as
   select * from dictionary.table_constraints
   where libname='SomeLibname';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Nov 2018 07:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513798#M2585</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-16T07:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: All datasets of a library with access permission</title>
      <link>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513811#M2587</link>
      <description>&lt;P&gt;My preferred method is to use an external command to retrieve the information:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let library=sasuser;

%let library_path=%sysfunc(pathname(&amp;amp;library));

filename dirlist pipe "ls -l &amp;amp;library_path/";

data attributes;
label
  number = '#'
  dsname = 'Name'
  memtype = 'Member Type'
  size = 'File Size'
  mod_date = 'Last Modified'
  mod_time = 'Time'
  permissions = 'Access Permission'
;
infile dirlist;
input
  permissions :$10.
  links :3.
  user :$8.
  group :$8.
  size :15.
  _month :$3.
  day :2.
  year_time :$5.
  dsname :$254.
;
retain number 0;
dsname = scan(dsname,-1,'/');
extension = scan(dsname,2,'.');
dsname = scan(dsname,1,'.');
if permissions ne 'total'; /* removes header */
if extension in ('sas7bdat','sas7bvew','sas7bcat');
length memtype $10;
select (extension);
  when ('sas7bdat') memtype = 'DATA';
  when ('sas7bvew') memtype = 'VIEW';
  when ('sas7bcat') memtype = 'CATALOG';
  otherwise;
end;
month = month(input('01' !! _month !! '1960',date9.));
if length(year_time) = 5
then do;
  if month &amp;gt; month(today())
  then year = year(today()) - 1;
  else year = year(today());
  mod_time = input(year_time,time5.);
end;
else do;
  year = input(year_time,4.);
  mod_time = 0;
end;
mod_date = mdy(month,day,year);
format
  mod_date yymmddd10.
  mod_time time5.
;
number + 1;
keep number dsname memtype size mod_date mod_time permissions;
run;

proc print data=attributes noobs label;
var number dsname memtype size mod_date mod_time permissions;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Nov 2018 08:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/All-datasets-of-a-library-with-access-permission/m-p/513811#M2587</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-16T08:20:46Z</dc:date>
    </item>
  </channel>
</rss>

