This widget could not be displayed.
This widget could not be displayed.
BookmarkSubscribeRSS Feed
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
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
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
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
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
sas_

do you have SAS9.2 or which earlier release?

hth
PeterC.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
i am having sas 9.2 .
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
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=;
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Thqs it worked

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2277 views
  • 0 likes
  • 4 in conversation
This widget could not be displayed.
This widget could not be displayed.