<?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 detect how many obs in one dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393190#M94676</link>
    <description>&lt;P&gt;What is your goal? What do you want to achieve?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2017 12:47:39 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-09-05T12:47:39Z</dc:date>
    <item>
      <title>how to detect how many obs in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393189#M94675</link>
      <description>&lt;P&gt;Someone suggest:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt; select count(*) into :observations from library.dataset;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would anybody tell me what to do next? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 12:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393189#M94675</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-09-05T12:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to detect how many obs in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393190#M94676</link>
      <description>&lt;P&gt;What is your goal? What do you want to achieve?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 12:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393190#M94676</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-09-05T12:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to detect how many obs in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393196#M94677</link>
      <description>&lt;P&gt;get the total number of obs&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393196#M94677</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-09-05T13:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to detect how many obs in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393197#M94678</link>
      <description>&lt;P&gt;This creates a macro variable holding the count.&amp;nbsp; You could write it out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;observations;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or a DATA step could use it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;n_obs = &amp;amp;observations;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the emoticon replacing your actual code, it's difficult to determine what the exact name of your macro variable is ... &amp;amp;observations, or &amp;amp;n_observations, or something similar.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393197#M94678</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-05T13:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to detect how many obs in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393314#M94705</link>
      <description>&lt;P&gt;Try SASHELP.VTABLE or the corresponding dictionary table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select nobs into :nobs_class TRIMMED
from sashelp.vtable 
where libname='SASHELP' and memname='CLASS';
quit;

%put Number of obs = &amp;amp;nobs_class;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 17:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-detect-how-many-obs-in-one-dataset/m-p/393314#M94705</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-05T17:17:26Z</dc:date>
    </item>
  </channel>
</rss>

