<?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 list all the datasets in a folder and number of observations in each dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443504#M110957</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to write a program to create a table with 2 columns. One column lists all the datasets names in a folder, one column lists the number of observations for&amp;nbsp;the corresponding&amp;nbsp;dataset.&amp;nbsp; Is there an easy way to do it?&amp;nbsp;My code&amp;nbsp;worked but it is looks not efficient and not neat enough.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 20:53:29 GMT</pubDate>
    <dc:creator>SSH2</dc:creator>
    <dc:date>2018-03-07T20:53:29Z</dc:date>
    <item>
      <title>list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443504#M110957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to write a program to create a table with 2 columns. One column lists all the datasets names in a folder, one column lists the number of observations for&amp;nbsp;the corresponding&amp;nbsp;dataset.&amp;nbsp; Is there an easy way to do it?&amp;nbsp;My code&amp;nbsp;worked but it is looks not efficient and not neat enough.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443504#M110957</guid>
      <dc:creator>SSH2</dc:creator>
      <dc:date>2018-03-07T20:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443506#M110958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/195848"&gt;@SSH2&lt;/a&gt;&amp;nbsp; Can you please share your code that you deem inefficient? I think it's a good practice to eliminate duplicate redundancies to avoid somebody to come up with the same code you wrote. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443506#M110958</guid>
      <dc:creator>MarkWik</dc:creator>
      <dc:date>2018-03-07T20:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443511#M110962</link>
      <description>&lt;P&gt;Are these SAS data sets?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so use SASHELP.VTABLE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set sashelp.vtable;
where libname='WORK';
keep libname memname nobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Mar 2018 21:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443511#M110962</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-07T21:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443515#M110965</link>
      <description>&lt;P&gt;Or similar to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s approach if looking for SAS datasets.&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   create table want as
   select memname, nobs
   from dictionary.tables 
   where libname='LIBRARY'
   ;
run;&lt;/PRE&gt;
&lt;P&gt;The library name should be in uppercase as that is the way SAS stores the information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the folder doesn't currently have a library associated then run a libname statement pointing to that library before the Proc SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the dictionary table version as I have a moderate number of permanently libraries and the SQL version runs notably faster than the datastep version for most tasks.&lt;/P&gt;
&lt;P&gt;This will send the various things you may request from the dictionary.tables to the Log:&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   describe table dictionary.tables 
   ;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Mar 2018 21:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/443515#M110965</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-07T21:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/444840#M111414</link>
      <description>Thank you very much Reeza!</description>
      <pubDate>Mon, 12 Mar 2018 16:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/444840#M111414</guid>
      <dc:creator>SSH2</dc:creator>
      <dc:date>2018-03-12T16:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: list all the datasets in a folder and number of observations in each dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/444841#M111415</link>
      <description>&lt;P&gt;Thank you very much!!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/list-all-the-datasets-in-a-folder-and-number-of-observations-in/m-p/444841#M111415</guid>
      <dc:creator>SSH2</dc:creator>
      <dc:date>2018-03-12T16:58:20Z</dc:date>
    </item>
  </channel>
</rss>

