<?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 know dataset contain data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490726#M128474</link>
    <description>&lt;P&gt;%let dsid=%sysfunc(open(sashelp.class));&lt;BR /&gt;%let nobs=%sysfunc(attrn(&amp;amp;dsid,nlobs));&lt;BR /&gt;%let dsid=%sysfunc(close(&amp;amp;dsid));&lt;/P&gt;&lt;P&gt;%put nobs= &amp;amp;nobs ;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 05:55:32 GMT</pubDate>
    <dc:creator>rajeshalwayswel</dc:creator>
    <dc:date>2018-08-29T05:55:32Z</dc:date>
    <item>
      <title>How to know dataset contain data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490724#M128472</link>
      <description>I have libray . library name is Main. Main library has some many datasets .In those datasets some datasets contain only variables there is no data and some datasets has data.&lt;BR /&gt;My question is how to know which datasets have data and which datasets haven't data at time</description>
      <pubDate>Wed, 29 Aug 2018 05:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490724#M128472</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-08-29T05:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to know dataset contain data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490726#M128474</link>
      <description>&lt;P&gt;%let dsid=%sysfunc(open(sashelp.class));&lt;BR /&gt;%let nobs=%sysfunc(attrn(&amp;amp;dsid,nlobs));&lt;BR /&gt;%let dsid=%sysfunc(close(&amp;amp;dsid));&lt;/P&gt;&lt;P&gt;%put nobs= &amp;amp;nobs ;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 05:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490726#M128474</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-08-29T05:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to know dataset contain data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490727#M128475</link>
      <description>&lt;P&gt;Query the relevant dictionary table for this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table empties as
select memname from dictionary.tables
where libname = 'MAIN' and nobs = 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 06:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490727#M128475</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-29T06:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to know dataset contain data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490776#M128509</link>
      <description>&lt;P&gt;DICTIONARY.TABLES is good for that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select memname,nlobs from dictionary.tables
  where libname='MAIN';
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I used NLOBS rather than NOBS, because NOBS includes deleted observations.&lt;/P&gt;&lt;P&gt;You can use a create table clause to put the stuff in a dataset, or you can put the table names that you want in a macro variable, e.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  select memname into :notempty separated by ' '
  from dictionary.tables where libname='MAIN' and NLOBS&amp;gt;0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 11:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-dataset-contain-data/m-p/490776#M128509</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-08-29T11:21:57Z</dc:date>
    </item>
  </channel>
</rss>

