<?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: create table for sas observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850087#M335997</link>
    <description>&lt;P&gt;Huh?&lt;/P&gt;
&lt;P&gt;Are you asking how to find out how many observations are in your datasets?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create tables want as
select libname,memname,nobs from dictionary.tables
  where libname='WORK'
;
quit;

proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Dec 2022 15:25:20 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-12-16T15:25:20Z</dc:date>
    <item>
      <title>create table for sas observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850085#M335996</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a table based on observation and keep the table name.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test1;
input var1 $;
datalines;
a
b
c
;
run;

data test2;
input var1 $;
datalines;
a
b
c
d
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My output should be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dht115_0-1671203662179.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78628i6B71AE932FEA93F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dht115_0-1671203662179.png" alt="dht115_0-1671203662179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850085#M335996</guid>
      <dc:creator>dht115</dc:creator>
      <dc:date>2022-12-16T15:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: create table for sas observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850087#M335997</link>
      <description>&lt;P&gt;Huh?&lt;/P&gt;
&lt;P&gt;Are you asking how to find out how many observations are in your datasets?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create tables want as
select libname,memname,nobs from dictionary.tables
  where libname='WORK'
;
quit;

proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850087#M335997</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-16T15:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: create table for sas observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850088#M335998</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
input var1 $;
datalines;
a
b
c
;
run;

data test2;
input var1 $;
datalines;
a
b
c
d
;
run;

PROC SQL noprint;
 create table work.wanted as
 select memname , nobs 
 from dictionary.tables
 where LIBNAME='WORK' and memname in ('TEST1','TEST2') and memtype='DATA';
QUIT;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-table-for-sas-observation/m-p/850088#M335998</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-12-16T15:25:24Z</dc:date>
    </item>
  </channel>
</rss>

