First, macros are not necessary, as SAS has many built-in ways of finding minimums and maximums of a column.
Next, even if you were to run your macro, it would never work because you cannot run PROC SQL inside a DATA step as you are trying to do. Further, in order to get any macro to work, the advice (which you should be following) is to get the code to work on one variable without using macros, before you try to turn it into a macro.
For your numeric variables, one way to get the min and max of the columns simply is via PROC SUMMARY
proc summary data=have;
var _numeric_;
output out=want min= max=/autoname;
run;
Since there is no such thing as a minimum of character variables, you'll have to define what you mean. If you just want the character variable levels counted, you can use PROC FREQ.
--
Paige Miller