If your macro contains any PROC or DATA step blocks it will halt the Proc Iml executing when encounter if it doesn't create an error condition.
Just like when I run this code:
Data junk;
set sashelp.class;
if sex='F' then weight=weight-1;
proc print data=junk;
run;
The SAS system when it encounters the PROC "knows" that you intended to end the data step and implies a "run;" statement.
Similarly if another Data step definition is encountered the same thing happens with the currently executing data step or proc terminating so the new data step can start.
You would have to post the entire code of the IML attempting to call the macro and the macro definition(s) to see what alternate ideas may be practical.