<?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: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540613#M149162</link>
    <description>Errors in generated cide are occurring at&lt;BR /&gt;&lt;BR /&gt;data=VALIB.ATTRLOOKUPout=ATTRLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;_&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;later at&lt;BR /&gt;2 + proc sort data=STSTGTBL.CENTLOOKUPout=CENTLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;&lt;BR /&gt;Both cases caused by lack of space before out= and nodupkey&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 05 Mar 2019 22:55:15 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2019-03-05T22:55:15Z</dc:date>
    <item>
      <title>Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539596#M148708</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;By referring this site "&lt;SPAN&gt;Get a list of dataset names in a directory/library&lt;/SPAN&gt;" i got an output of sas Library with column name.&lt;/P&gt;&lt;P&gt;and referring Proc Contents i can able to get no of rows and columns but i am&amp;nbsp; unable to get distinct rows for each data sets . I am looking for&amp;nbsp;distinct rows of each data sets and referring&amp;nbsp; 'FileName' name column dynamically.Attached sample data.&lt;/P&gt;&lt;P&gt;Can help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 12:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539596#M148708</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-03-01T12:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539613#M148715</link>
      <description>&lt;P&gt;The table SASHELP.VTABLE always has this information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if you are interested in all SAS data sets in a library named PAIGE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.vtable(where=(libname='PAIGE' and memtype='DATA'));
    id memname;
    var nobs nvar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 13:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539613#M148715</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-01T13:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539615#M148716</link>
      <description>&lt;P&gt;You would need to do something like:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set sashelp.vtable (where=(libname="&amp;lt;yourlib&amp;gt;"));
  call execute(cats('proc sort data=&amp;lt;yourlib&amp;gt;.',memname,' out=dist_',memname,' nodupkey; by _all_; run;'));
run;&lt;/PRE&gt;
&lt;P&gt;Replace &amp;lt;libname&amp;gt; with your library.&amp;nbsp; The above will run a proc sort on all the datasets, then you can take from sashelp.vtable number of rows, just like the other datasets.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 13:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539615#M148716</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-01T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539643#M148729</link>
      <description>Is distinct counting to&lt;BR /&gt; apply distinct across all columns in a table &lt;BR /&gt;Or distinct counts for each column&lt;BR /&gt;(The second approach might be useful too)</description>
      <pubDate>Fri, 01 Mar 2019 14:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539643#M148729</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2019-03-01T14:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539699#M148754</link>
      <description>&lt;P&gt;Thanks for the answer Paige Miller.&lt;/P&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-main"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-component-body"&gt;&lt;DIV class="lia-rating-metoo"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-footer"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-left lia-quilt-column-footer-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-message-notify lia-component-report-abuse"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Mar 2019 17:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/539699#M148754</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-03-01T17:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540503#M149108</link>
      <description>&lt;P&gt;Hi RW ,Thanks for Help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below code is selecting the data set names , but it's throwing an error.Could you please help on fixing this.Below are Error logs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Code*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;set sashelp.vtable (where=(libname="STSTGTBL"));&lt;BR /&gt;call execute(cats('proc sort data=STSTGTBL.',memname,' out=dist_',memname,' nodupkey; by _all_; run;'));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Error1*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;24 data _null_;&lt;BR /&gt;25 set WORK.QUERY_FOR_AAA (where=(Library_Name="STSTGTBL"));&lt;BR /&gt;26 call execute(cats('proc sort data = STSTGTBL. ',Table_Name,'out= dis_',Table_Name,'nodupkey; by _all_; run;'));&lt;BR /&gt;27 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 131 observations read from the data set WORK.QUERY_FOR_AAA.&lt;BR /&gt;WHERE Library_Name='STSTGTBL';&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;NOTE: CALL EXECUTE generated line.&lt;BR /&gt;NOTE: Line generated by the CALL EXECUTE routine.&lt;BR /&gt;1 + proc sort data = STSTGTBL.ABSENTEEISM_NGout= dis_ABSENTEEISM_NGnodupkey; by _all_; run;&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the CALL EXECUTE routine.&lt;BR /&gt;2 The SAS System 09:21 Tuesday, March 5, 2019&lt;/P&gt;&lt;P&gt;2 + proc sort data = STSTGTBL.ACTIVEDLYSNAPTILL30SEP2018_0000out= dis_ACTIVEDLYSNAPTILL30SEP2018_0000nodupkey; by _all_;&lt;BR /&gt;run;&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR: Invalid data set name STSTGTBL.ACTIVEDLYSNAPTILL30SEP2018_0000out.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 17:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540503#M149108</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-03-05T17:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540520#M149114</link>
      <description>Need to generate a blank before OUT=</description>
      <pubDate>Tue, 05 Mar 2019 17:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540520#M149114</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2019-03-05T17:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540522#M149115</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I changed it before&amp;nbsp;running&amp;nbsp;' out=dist_'&amp;nbsp; i tried running instead&amp;nbsp;of&amp;nbsp;out= but i am getting below error&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*Code:*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data _null_;&lt;BR /&gt;set sashelp.vtable (where=(libname="STSTGTBL"));&lt;BR /&gt;call execute(cats('proc sort data=STSTGTBL.',memname,'out=',memname,' nodupkey; by _all_; run;'));&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;23 GOPTIONS ACCESSIBLE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;24 data _null_;&lt;BR /&gt;25 set sashelp.vtable (where=(libname="&lt;SPAN&gt;STSTGTBL&lt;/SPAN&gt;"));&lt;BR /&gt;26 call execute(cats('proc sort data=&lt;SPAN&gt;STSTGTBL&lt;/SPAN&gt;.',memname,'out=',memname,' nodupkey; by _all_; run;'));&lt;BR /&gt;27 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 4 observations read from the data set SASHELP.&lt;SPAN&gt;STSTGTBL&lt;/SPAN&gt;.&lt;BR /&gt;WHERE libname='VALIB';&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;NOTE: CALL EXECUTE generated line.&lt;BR /&gt;NOTE: Line generated by the CALL EXECUTE routine.&lt;BR /&gt;1 + proc sort data=VALIB.ATTRLOOKUPout=ATTRLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Line generated by the CALL EXECUTE routine.&lt;BR /&gt;2 The SAS System 11:53 Tuesday, March 5, 2019&lt;/P&gt;&lt;P&gt;2 + proc sort data=&lt;SPAN&gt;STSTGTBL&lt;/SPAN&gt;.CENTLOOKUPout=CENTLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 17:57:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540522#M149115</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-03-05T17:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540613#M149162</link>
      <description>Errors in generated cide are occurring at&lt;BR /&gt;&lt;BR /&gt;data=VALIB.ATTRLOOKUPout=ATTRLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;_&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: DATA, DUPOUT, IN, OUT, SIZE, SORTSEQ, SORTSIZE, T, TECH, TECHNIQUE,&lt;BR /&gt;UNIOUT, UNIQUEOUT.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;later at&lt;BR /&gt;2 + proc sort data=STSTGTBL.CENTLOOKUPout=CENTLOOKUPnodupkey; by _all_; run;&lt;BR /&gt;&lt;BR /&gt;Both cases caused by lack of space before out= and nodupkey&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Mar 2019 22:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540613#M149162</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2019-03-05T22:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540614#M149163</link>
      <description>If you cannot rearrange the syntax to ensure only a semicolon follows memname, one possibility that might work is to place something to act  like a hard blank before out= and nodupkey. I think the syntax &lt;BR /&gt;'%str( ) out= '  and&lt;BR /&gt;'%str( ) nodupkey; by _all_; run;'&lt;BR /&gt;&lt;BR /&gt; might do it, as long as these have single not double quotes&lt;BR /&gt;(or the blank in %( ) would resolve to early)&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Mar 2019 23:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540614#M149163</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2019-03-05T23:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540697#M149202</link>
      <description>&lt;P&gt;Sorry, yes, I hadn't noticed as I didn't have anything to test it on.&amp;nbsp; Its a simple change:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set sashelp.vtable (where=(libname="STSTGTBL"));
  call execute(cat('proc sort data=STSTGTBL.',memname,' out=dist_',memname,' nodupkey; by _all_; run;'));
run;&lt;/PRE&gt;
&lt;P&gt;Note, instead of using cats() which strips blanks from start and end of strings, I use cat().&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 08:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540697#M149202</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-06T08:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALL SAS library name with Data set names, columns,no of rows,distinct rows,no of columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540729#M149217</link>
      <description>&lt;P&gt;Thanks A lot Peter. I have used the above mentioned&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;syntax&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'%str( ) out= ' and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'%str( ) nodupkey; by _all_; run;' .Also The Code is running and generating Outputs.But output data sets are limited to 50 only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data _null_;&lt;BR /&gt;set sashelp.vtable (where=(libname="MAPSSAS"));&lt;BR /&gt;call execute(cats('proc sort data=MAPSSAS.',memname,'%str() out=out_',memname,'%str() nodupkey; by _all_; run;'));&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by using this code&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;print&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;sashelp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;vtable&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;libname&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'PAIGE'&lt;/SPAN&gt; and memtype&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'DATA'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token keyword"&gt;id&lt;/SPAN&gt; memname&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt; nobs nvar&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;i am getting output of memname ,Nobs and Nvar, Also i need No of distinct rows for each data sets.will you please help me out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;memname&lt;/TD&gt;&lt;TD&gt;nobs&lt;/TD&gt;&lt;TD&gt;nvar&lt;/TD&gt;&lt;TD&gt;Ndistinct&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AFGHANI2&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AFGHANIS&lt;/TD&gt;&lt;TD&gt;2644&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AFRICA&lt;/TD&gt;&lt;TD&gt;52824&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AFRICA2&lt;/TD&gt;&lt;TD&gt;61&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ALGERIA&lt;/TD&gt;&lt;TD&gt;1617&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ALGERIA2&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ANDORRA&lt;/TD&gt;&lt;TD&gt;203&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ANDORRA2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ANOMALY&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ANTARCT2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ANTARCTI&lt;/TD&gt;&lt;TD&gt;18071&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ARGENTI2&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ARGENTIN&lt;/TD&gt;&lt;TD&gt;3852&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 06 Mar 2019 11:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ALL-SAS-library-name-with-Data-set-names-columns-no-of-rows/m-p/540729#M149217</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-03-06T11:08:55Z</dc:date>
    </item>
  </channel>
</rss>

