Hi SAS Users, I am having multiple SAS datasets in the below mentioned paths. libname base "C:/SASUniversityEdition/myfolders/sasuser.v94/base"; /*(e.g. have_base, adverse_base, conmeds_base)*/ libname current "C:/SASUniversityEdition/myfolders/sasuser.v94/current"; /*(e.g. have_current, adverse_current,conmeds_current)*/ now we want to pickup all SAS datasets from the corresponding path and run it on the code. lile it has to pick up have_base data from /base path and have_current data from /current path then run the code and generate the output in one dataset. AND it has to pick up adverse_base data from /base path and adverse_current data from /current path then run the code and generate the output in one dataset. finally all output datasets should be one final dataset. /*data in have_base*/ data have_base; input name $ value month $; cards; bala 402 jun sri 593 sep sudh 543 jul ; run; proc sort data=have_ base; by name; run; /*data in have_current*/ data have_current; input name $ value month $; cards; bal 432 jun sri 543 sep sudh 563 jul ; run; proc sort data=have_current; by name; run; data both; merge have_base(in=a) have_current(in=b); by name; if a and b; run; please do let me know if am not clear. Kind Regards, Raju
... View more