@SASKiwi and @Astounding. Yes. Every data set that is part of LIB where the name begins with dat_ (such as lib.dat_04FEB15, lib.dat_05FEB15 ...). And my intention is not to split those permanent data sets. I intend to read each of those data sets and perform same operation to get output data set (operation is not shown in the code). In my program, I have two parameters one (i=) for naming each output data sets name such t1 for first output dataset, t2 for second output data set and so on. Second parameter (date) for refereeing each permanent data set. I should have different name for this parameter as it is confused with date. So If I want to read and create another data set, I have to call macro again like below. The second macro call read lib.dat_04FEB15 and create t2 output data set. May be there is data step alternative to do this. %macro mac (i=,date=);
proc sql;
create table t&i. as
select *
from lib.dat_&date.
quit;
run;
%mend mac;
%mac(i=1,date=05FEB16)
%mac(i=2,date=04FEB16)
... View more