BookmarkSubscribeRSS Feed
sas_
Fluorite | Level 6
Hi

I am having a library names NEW in that i have 20 datasets like A,RB,CA,DQ,EO,TF,G,Jk,Ed,LO,PI,UI,TY,QW.....with variable names ex-Age id no name in all the above datasets
Now i want to create a new dataset a21 with all the first observarions from datasets names above in to new dataset a21.
5 REPLIES 5
Patrick
Opal | Level 21
Syntax working for SAS9.2:

data a_1 a_2 a_3;
do i=1 to 5;
output;
end;
run;

data a_all;
set a_1 -a_3 (obs=1);
run;

Before SAS9.2 it would be:
set a_1(obs=1) a_2(obs=1).... ;


Message was edited by: Patrick
Peter_C
Rhodochrosite | Level 12
sas_

do you have SAS9.2 or which earlier release?

hth
PeterC.
sas_
Fluorite | Level 6
i am having sas 9.2 .
P_J
Calcite | Level 5 P_J
Calcite | Level 5
Please try something like this to see if it works, I'm using 9.1.3

proc sql;
select cats("NWK.",memname) into :dsn separated by " "
from sashelp.vstable
where libname ="NWK"
;
quit;

options obs=1;
data all;
set &dsn;
run;


%put &dsn=;
sas_
Fluorite | Level 6
Thqs it worked

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 1183 views
  • 0 likes
  • 4 in conversation