good try.
there are many ways to copy sales to x as I said before, but I am just curious what is wrong with my code(As you can see, it looks good and reasonable).
After macro compiling, the program processing should be that the following codes were executed sequentially:
data b; set a; nn =1;x =36;output;run;
data b; set a; nn =2;x =58;output;run;
…
data b; set a; nn =5;x =27;output;run;
After being continuously overwritten, the set b in the last round is the final one: nothing more than assigning number to both variables of nn and x.
you could see it more clearly by changing data b; >>>data;
jingju