Hi, I have been given a massive table (800+ columns, over 200,000 rows) with both character and numeric columns. I have been asked to find the proportion of missing data in each column, both overall and the average annually, and present the results in a table. I have written macros for both numeric and character variables which will produce a row of the required data and append it to a table which will become the final table. However, at the moment I will have to write all 800+ variable names into the macros one by one and then run it all at once. Is there any way to write a macro that will run through the variables, decide if the current variable is numeric or character, and put it into the appropriate macro? For example, something like: %macro master_macro(dataset, date_var); while(current variable exists) if the current variable is numeric do my_numeric_macro(dataset, current variable, date_var); else do my_character_macro(dataset, current variable, date_var); current variable = next variable %mend Apologies for the sloppy pseudo code!
... View more