<?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: How to find all the datasets in a library with zero observation and create a dataset with the dataset names? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104180#M21774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;create table temp/* if you want it use in a dataset*/ as select libname as library_name,&lt;/P&gt;&lt;P&gt;memname as Name&lt;/P&gt;&lt;P&gt;from sashelp.Vtable where Libname="Work" /* you can use any library*/&lt;/P&gt;&lt;P&gt;and nobs=0;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;into:Nobs&lt;/P&gt;&lt;P&gt;from temp;&lt;/P&gt;&lt;P&gt;Select Name&lt;/P&gt;&lt;P&gt;into :Name1-:Name%left(&amp;amp;Nobs)&lt;/P&gt;&lt;P&gt;from temp;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Dec 2012 20:05:58 GMT</pubDate>
    <dc:creator>smonodeep</dc:creator>
    <dc:date>2012-12-23T20:05:58Z</dc:date>
    <item>
      <title>How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104175#M21769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need to find all the datasets with zero observation in a library. How should I do that? Any suggestion is highly appreciated.&lt;/P&gt;&lt;P&gt;Thanks - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 14:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104175#M21769</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-12-19T14:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104176#M21770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linlin,&lt;/P&gt;&lt;P&gt;Could you use dictionary.tables to find your info? there is a variable 'nobs' delivering what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 15:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104176#M21770</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-19T15:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104177#M21771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Haikuo,&lt;/P&gt;&lt;P&gt;Thank you very much! - Linlin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select memname,nobs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; from dictionary.tables &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK' and memname like "_%" and nobs=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt; proc print data=want;&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 15:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104177#M21771</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-12-19T15:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104178#M21772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recommend you use nlobs to instead fo nobs.&lt;/P&gt;&lt;P&gt;When Some data set be modified directly ,not random modified, NOBS will return not exactly the nobs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 01:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104178#M21772</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-20T01:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104179#M21773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good point. Thank you Ksharp! - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 02:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104179#M21773</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-12-20T02:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the datasets in a library with zero observation and create a dataset with the dataset names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104180#M21774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;create table temp/* if you want it use in a dataset*/ as select libname as library_name,&lt;/P&gt;&lt;P&gt;memname as Name&lt;/P&gt;&lt;P&gt;from sashelp.Vtable where Libname="Work" /* you can use any library*/&lt;/P&gt;&lt;P&gt;and nobs=0;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;into:Nobs&lt;/P&gt;&lt;P&gt;from temp;&lt;/P&gt;&lt;P&gt;Select Name&lt;/P&gt;&lt;P&gt;into :Name1-:Name%left(&amp;amp;Nobs)&lt;/P&gt;&lt;P&gt;from temp;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 20:05:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-all-the-datasets-in-a-library-with-zero-observation/m-p/104180#M21774</guid>
      <dc:creator>smonodeep</dc:creator>
      <dc:date>2012-12-23T20:05:58Z</dc:date>
    </item>
  </channel>
</rss>

