cypher85, You would be better served, and learn more, if you took this in steps. Each of these steps will force you to learn something. First, without the use of any macro language, how could a single DATA step process all 6 variables? Remember, each DATA step has to input and output all the observations. If you can use one DATA step instead of six, your programs will run considerably faster. Second, how could you do this in macro language? Using just one data set, pass a list of variable names instead of just one. Have the macro use that list of variable names to construct the program that you came up with in step 1. Finally, how could you add a second parameter to the macro that contains a list of data set names. Have the macro run through the same process for each data set in the list. This is the least important step on the list. Your program would be easier to write, and easier to understand, if you were to forget about this step and just run the macro separately for each of your four data sets. Good luck.
... View more