The real trick is using the line "call excecute(%macro_name);" This allows the macro to be called for each row of data.
Sample code:
Data set:
data data_1; input name $ age; datalines; Fred 5
Mike 8
Joel 6 ;
Macro sample:
%macro print(name,n);
%put "&name. is &n years old.";
%mend;
%put "&name. is &n years old.";
%mend;
Macro call:
Data _null_;
set data_1;
call execute('%print('||name||','||'age)');
run;
Thanks for your time today.