"wouldn't it be possibel to assign the counter j inside the data steps to n, and then name my variables Var_&n? "
NO because n is not &n
Use an array to create your variables and forget about creating and using macro variables to do this. You are making a simple situation much to complex.
var_(j) = assignment;
will do the job. You simply do not need the macros here.
The OP error is due to the fact that the %eval is compile time. At that point i is 'i' not the value of the datastep variable i.
It leads to other confusion of using macro variables for program flow within a datastep when they are not needed. It is much better to use datastep variables to control loops within the datastep whenever possible. My feeling is that this all could be done without the use of macros, except for the repitition of the datastep itself.
I believe that you can't assign a macro variable a value with a data set variable, because the macro statements will be compiled to generate open code value or statements before the data set statements were executed.
So p=&m+i will work, and after complied, this will be converted to a open code statement with a real value of macro variable m, ie. p=3+i;