When you call execute a macro that contains macro logic, use %nrstr:
call execute('%nrstr(%mail'));
otherwise you will experience macro timing problems. Macro statements are executed immediately, but Base SAS code has to wait until the calling datastep ends. %nrstr prevents premature execution of macro logic.
... View more