<?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: Number of columns and rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849421#M335825</link>
    <description>&lt;P&gt;Don't forget to STOP;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: DATA STEP stopped due to looping.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 14:01:13 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2022-12-13T14:01:13Z</dc:date>
    <item>
      <title>Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849332#M335800</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I have a few datasteps where I create a new dataset after running. These datasteps&amp;nbsp; affect the number or rows or columns in my dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do&amp;nbsp; keep the information about number of columns and rows of each dataset so that I can create a graph how may records or columns I added/droped?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 08:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849332#M335800</guid>
      <dc:creator>znhnm</dc:creator>
      <dc:date>2022-12-13T08:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849335#M335801</link>
      <description>&lt;P&gt;This information can be obtained from the DICTIONARY.TABLES in PROC SQL, or the corresponding SASHELP.VTABLE view.&lt;/P&gt;
&lt;P&gt;For details on columns use DICTIONARY.COLUMNS/SASHELP.VCOLUMN.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 09:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849335#M335801</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-12-13T09:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849338#M335803</link>
      <description>&lt;P&gt;See if you can use this as a template&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table tableinfo as
   select * from dictionary.tables
   where libname = 'SASHELP'
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Dec 2022 09:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849338#M335803</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-12-13T09:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849343#M335804</link>
      <description>Thanks for the reply! what do I write for the "tables" in line 2? Also, where do I list the relevant tables in my caslib? (I have irrelevant tables in the same caslib)</description>
      <pubDate>Tue, 13 Dec 2022 09:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849343#M335804</guid>
      <dc:creator>znhnm</dc:creator>
      <dc:date>2022-12-13T09:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849366#M335812</link>
      <description>&lt;P&gt;You can start with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   describe dictionary.tables;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There you can see a columns names MEMNAME (if remember correctly).&lt;/P&gt;
&lt;P&gt;So just add that to the where clause:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table tableinfo as
   select * from dictionary.tables
   where libname = 'MYCASLIB' and
         memname = 'MYCASTAB'
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Dec 2022 10:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849366#M335812</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-12-13T10:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849399#M335822</link>
      <description>&lt;P&gt;While learning to use dictionary.tables and dictionary.columns is a very good idea, there are also other ways to do this.&lt;/P&gt;
&lt;P&gt;Here is a simple datastep hack, showing how to get the information for SASHELP.CLASS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  if 0 then set sashelp.class nobs=_nobs;
  array _chars _character_;
  array _nums _numeric_;
  call symputx('columns',dim(_chars)+dim(_nums));
  call symputx('rows',_nobs);
run;

%put &amp;amp;=columns;
%put &amp;amp;=rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 12:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849399#M335822</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2022-12-13T12:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849410#M335824</link>
      <description>&lt;P&gt;I haven't had the opportunity yet to really work with Viya/CAS but I believe that all the answers given so far that reference the SAS Dictionary tables are not applicable for CAS tables but only for SAS 9.4 SAS files (I can be wrong). As I understand it working with CAS tables is closer to working with database tables than with SAS 9.4 SAS files.&lt;/P&gt;
&lt;P&gt;Running code in SPRE you can eventually use the SAS dictionary tables for getting the list of tables (dictionary.tables) and it's certainly worth to check if the column for number of observations is populated - but I doubt that this will work.&lt;/P&gt;
&lt;P&gt;Just based on docu and depending on your environment you need likely to use either&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/vdmmlcdc/8.1/casref/p0e32z0e8q5ge6n1fk1u8cuhzj4g.htm" target="_self"&gt;Proc CASUTI&lt;/A&gt;L, &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_032/caspg/p07raa83ohwcurn1o548mvly8mzg.htm" target="_self"&gt;Proc CAS&lt;/A&gt; or &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/casanpg/cas-simple-numrows.htm" target="_self"&gt;CASL&lt;/A&gt; to retrieve such information.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 13:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849410#M335824</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-12-13T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849421#M335825</link>
      <description>&lt;P&gt;Don't forget to STOP;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: DATA STEP stopped due to looping.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849421#M335825</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-12-13T14:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849569#M335863</link>
      <description>&lt;P&gt;I don't have access to SAS Viya at this point, but I was assuming (maybe incorrectly) that if you have a libref assigned to your caslib, that it contents would show up in the PROC SQL DICTIONARY...?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 07:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849569#M335863</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-12-14T07:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Number of columns and rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849595#M335870</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I don't have access to SAS Viya at this point, but I was assuming (maybe incorrectly) that if you have a libref assigned to your caslib, that it contents would show up in the PROC SQL DICTIONARY...?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I also believe it would show the tables but not necessarily a row count - similar to what you'd see if it would be a libref pointing to a database table.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 10:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-columns-and-rows/m-p/849595#M335870</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-12-14T10:40:17Z</dc:date>
    </item>
  </channel>
</rss>

