<?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: A strange thing about getting numbers of all library's datasets. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37899#M7569</link>
    <description>If i change the code to this:&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set sashelp.vstable nobs=a;&lt;BR /&gt;
call symput('numwk3',a);&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;numwk3;&lt;BR /&gt;
the result is still 9.0071E15.&lt;BR /&gt;
&lt;BR /&gt;
very strange!</description>
    <pubDate>Sun, 10 Aug 2008 11:28:27 GMT</pubDate>
    <dc:creator>Black</dc:creator>
    <dc:date>2008-08-10T11:28:27Z</dc:date>
    <item>
      <title>A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37896#M7566</link>
      <description>I want to get the numbers of all libraries' datasets. I can use there kinds of ways, as following:&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
         select count(memname)           &lt;BR /&gt;
         into :numwk1&lt;BR /&gt;
         from sashelp.vstable;&lt;BR /&gt;
quit;&lt;BR /&gt;
%put &amp;amp;numwk1;   /*-------------------------------------=3677*/&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
       set sashelp.vstable end=eof;&lt;BR /&gt;
         retain count 0;&lt;BR /&gt;
                count+1;&lt;BR /&gt;
       if eof then do;&lt;BR /&gt;
          call symput('numwk2',left(count));&lt;BR /&gt;
       end;&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;numwk2; /*--------------------------------------=3677*/&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   if 0 then set sashelp.vstable nobs=a;&lt;BR /&gt;
  call symput('numwk3',a);&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;numwk3; /*--------------------------=9.0071993E15*/&lt;BR /&gt;
&lt;BR /&gt;
Why the third answer is different with others?&lt;BR /&gt;
&lt;BR /&gt;
Thanks a million.</description>
      <pubDate>Sat, 09 Aug 2008 14:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37896#M7566</guid>
      <dc:creator>Black</dc:creator>
      <dc:date>2008-08-09T14:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37897#M7567</link>
      <description>Ran your code.  Did you notice the message below in your SASLOG?&lt;BR /&gt;
&lt;BR /&gt;
NOTE: DATA STEP stopped due to looping.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sat, 09 Aug 2008 17:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37897#M7567</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-08-09T17:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37898#M7568</link>
      <description>Thank you very much for your reminding.&lt;BR /&gt;
I don't know why there is a looping here?&lt;BR /&gt;
If i use this code to a normal data set, it is ok.&lt;BR /&gt;
How could this looping happen?</description>
      <pubDate>Sun, 10 Aug 2008 11:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37898#M7568</guid>
      <dc:creator>Black</dc:creator>
      <dc:date>2008-08-10T11:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37899#M7569</link>
      <description>If i change the code to this:&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set sashelp.vstable nobs=a;&lt;BR /&gt;
call symput('numwk3',a);&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;numwk3;&lt;BR /&gt;
the result is still 9.0071E15.&lt;BR /&gt;
&lt;BR /&gt;
very strange!</description>
      <pubDate>Sun, 10 Aug 2008 11:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37899#M7569</guid>
      <dc:creator>Black</dc:creator>
      <dc:date>2008-08-10T11:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37900#M7570</link>
      <description>This is not so trange when you think that VSTABLE is a view, not a dataset. Being so, it cannot have the number of observations stored in a "contents" part of the physical file. Hence the wrong value, which must stand for "infinity", I think. Other solutions really &lt;I&gt;count&lt;/I&gt; the records, so they give the correct answer.&lt;BR /&gt;
&lt;BR /&gt;
And just a tip : the SASHELP views are based on SQL views stored in a pseudo library called DICTIONARY. For efficiency sake, you'd better change the first solution to FROM DICTIONARY.TABLES ; to avoid using one view on a view. Unfortunately, in a Data step, you are compelled to use the SASHELP views, since the DICTIONARY views are only available in an SQL query.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Olivier</description>
      <pubDate>Sun, 10 Aug 2008 16:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37900#M7570</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-08-10T16:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37901#M7571</link>
      <description>Thank you, Olivier, you really got the point.</description>
      <pubDate>Sun, 17 Aug 2008 15:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37901#M7571</guid>
      <dc:creator>Black</dc:creator>
      <dc:date>2008-08-17T15:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: A strange thing about getting numbers of all library's datasets.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37902#M7572</link>
      <description>Black&lt;BR /&gt;
&lt;BR /&gt;
why not use proc contents or proc datasets or sashelp.vtable?&lt;BR /&gt;
&lt;BR /&gt;
Of course a view does not store a count of the information it will provide when executed, but otherwise dictionary.tables surfaced as sashelp.vtable is very informative.... &lt;BR /&gt;
 ... so why do you want new code to provide this information ... ?&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 18 Aug 2008 11:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-strange-thing-about-getting-numbers-of-all-library-s-datasets/m-p/37902#M7572</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-18T11:43:53Z</dc:date>
    </item>
  </channel>
</rss>

