The answer depends on what you want to do with the data.
1. Do you want to analyze each data set separately? (This is the most common wish.) Then you can read the data set names from an array like this:
proc iml;
dsName = "input1":"input10";
do i = 1 to ncol(dsName);
use (dsName[i]);
read all var _ALL_ into X;
close (dsName[i]);
/* do a computation for this data set */
end;
2. Do you want to read all of the data into IML matrices and then do computations across data sets? (This is rare.) If so, you can follow the directions in this article about reading data into separate matrices.
In either case, you don't need any macro code, so get rid of the %DO statements and replace them with SAS/IML DO loops.
... View more