The question is, do you understand the difference between macro and datastep? Datastep is the SAS language, it is designed to have fiull functionality, all data structures, operations and such like need to manipulate data. Macro on the other hand has none of this. It is purely there to generate some text which would resolve to be datastep. It has no data structures other than text, and no functionality within itself to process data.
The next question would be, why is the data all split up, with data actually appearing as dataset name. Thats an innefficient methodology from a programming perspective. Far simpler to do:
data all_data;
format dte date9.;
set interval.d: indsname=nme;
dte=input(nme,best.); /* set whatever the format of 20499 is? */
run;
Not sure what the 20499 stands for in your example, maybe its a numeric date, then best should do it. You then have one dataset with a variable to indicate date timestamp. Then you can use datasteps, interval functions etc.
... View more