<?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: Anyway to get dataset's row count?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798811#M314027</link>
    <description>&lt;P&gt;Using DICTIONARY.TABLES in PROC SQL does exactly that, it reads the dataset metadata from the dataset header page.&lt;/P&gt;
&lt;P&gt;If you need the number for processing outside of SQL, you can use SASHELP.VTABLE, which is a SQL view of DiCTIONARY.TABLES.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Feb 2022 06:53:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-02-26T06:53:33Z</dc:date>
    <item>
      <title>Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798810#M314026</link>
      <description>&lt;P&gt;Not go through the dataset, or using sql?&amp;nbsp; Anyway using macro directly by fetching from meta info?!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 06:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798810#M314026</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-26T06:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798811#M314027</link>
      <description>&lt;P&gt;Using DICTIONARY.TABLES in PROC SQL does exactly that, it reads the dataset metadata from the dataset header page.&lt;/P&gt;
&lt;P&gt;If you need the number for processing outside of SQL, you can use SASHELP.VTABLE, which is a SQL view of DiCTIONARY.TABLES.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 06:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798811#M314027</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-26T06:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798812#M314028</link>
      <description>&lt;P&gt;hello there&lt;/P&gt;
&lt;P&gt;What's wrong with SQL querying dictionary tables (=NOT a select count(*) ). Anyhow here one way without SQL.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('n_obs',nobs);
  stop;
  set sashelp.class nobs=nobs;
run;

%put &amp;amp;=n_obs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 07:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798812#M314028</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-02-26T07:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798820#M314034</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dsid=%sysfunc(open(sashelp.class));
%let nobs=%sysfunc(attrn(&amp;amp;dsid,nlobs));
%let dsid=%sysfunc(close(&amp;amp;dsid));

%put SASHELP.CLASS has &amp;amp;nobs. obs. ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Feb 2022 10:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/798820#M314034</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-26T10:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799102#M314191</link>
      <description>&lt;P&gt;my SASHELP.VTABLE only shows up info on dataset in sashelp, not in work ...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 10:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799102#M314191</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-28T10:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799103#M314192</link>
      <description>&lt;P&gt;this works great. SQL count seems to me it goes count rather than grab from meta info&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 10:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799103#M314192</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-28T10:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Anyway to get dataset's row count?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799123#M314199</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;my SASHELP.VTABLE only shows up info on dataset in sashelp, not in work ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;SASHELP.VTABLE has metadata for ALL datasets in currently assigned libraries, which includes WORK:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;
run;

data _null_;
set sashelp.vtable;
where libname ="WORK" and memname = "CLASS";
put nobs=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt; 69         data class;
 70         set sashelp.class;
 71         run;
 
 NOTE: There were 19 observations read from the data set SASHELP.CLASS.
 NOTE: The data set WORK.CLASS has 19 observations and 5 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              827.78k
       OS Memory           24228.00k
       Timestamp           28.02.2022 01:56:05 nachm.
       Step Count                        24  Switch Count  2
       Page Faults                       0
       Page Reclaims                     183
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 72         
 73         data _null_;
 74         set sashelp.vtable;
 75         where libname ="WORK" and memname = "CLASS";
 76         put nobs=;
 77         run;
 
 nobs=19
 NOTE: There were 1 observations read from the data set SASHELP.VTABLE.
       WHERE (libname='WORK') and (memname='CLASS');
&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Feb 2022 13:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Anyway-to-get-dataset-s-row-count/m-p/799123#M314199</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-28T13:57:41Z</dc:date>
    </item>
  </channel>
</rss>

