A far simpler methodology, and one which should be on the first page of every learning manual, is data structure. You are finding that your life is difficult because of one simple fact, you have put "data" into an area which is not designed to hold "data". Dataset names, column names, these are here for the purpose of making programming simpler and more efficient, they are Not designed to hold "data". Column labels, and observations are designed to hold data.
The reason I point this out is that by a simple structure change to your data, you can eliminate all that code, and write simple basic efficient and easy to maintain Base SAS code, which will do exactly the same purpose. Where you have datasets called taxYYYYMM, create one dataset, which has all the data, with columns for YYYY and MM:
data tax201502;
a=1; output;
run;
data tax201503;
a=2; output;
run;
data tax;
set work.tax: indsname=nme;
year=input(substr(scan(nme,2,"."),4,4),4.);
month=input(substr(scan(nme,2,"."),8,2),2.);
run;
Now you have one dataset with all your data in one place. You can manipulate this one dataset using simple basic datasteps, no need for looping or macros or any other complicated code. And if for some reason you need to split them up again later on, then that again is a simple datastep output routine. Remember the data structure is there for your benefit.
... View more