BookmarkSubscribeRSS Feed
jakarman
Barite | Level 11

if you go to sashelp.vtable you will see all the tables and their number of observations
It is a table you can process that as a table. 

---->-- ja karman --<-----
jakarman
Barite | Level 11

You can submit that code of Tom to your remote session.
Having a RLS working it will run. Is it an external RDBMS you need to have the count(*) approach. 

Some RDBMS are supporting the retrieval of metadata information.  

---->-- ja karman --<-----
damanaulakh88
Obsidian | Level 7


Here is the code you can use:

/*Creating Datasets*/

data a;
input name$ emp;
datalines;
aaa 121
bb 232
ccc 989
;
run;

data b;
input name$ emp;
datalines;
aaa 121
ccc 989
;
run;
data c;
input name$ emp;
datalines;
aaa 121
bb 232
;
run;
data d;
input name$ emp;
datalines;
aaa 121
bb 232
ccc 989
erf 455
;
run;

data testimportcont;
input testnumber $ table $;
datalines;
a1 a
a2 b
a3 c
a4 d
;
run;
proc sql inobs=50;
select trim(testnumber), trim(table) into :p1-:p4,:tab1-:tab4              
from testimportcont;
quit;

options mprint mlogic symbolgen;
%macro counting;
proc sql;
%do i=1 %to 4;
select count(*) into :counting1-:counting4 from &&&tab&i.;
%end;
quit;
%mend;
%counting;

=====Output=====

Hope this helps.

Capture.JPG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 1763 views
  • 0 likes
  • 6 in conversation