In reply to pratheep.

Hi Pratheep,
You cannot run your macro within a data step because your macro itself is a data step. In order to be run within a data step your macro must consist of macro statements, but it cannot be another data step. Or CALL EXECUTE can generate a code for each data step iteration and push it outside the data step for execution; in this case you should use %nrstr macro function as described in this post to defer the macro execution. Also, you incorrectly pass variable name as macro parameter; for correct usage see this example in the blog post:

data _null_;
set parmdl.tablelist;
call execute('%nrstr(%onetable('!!strip(tname)!!'));');
run;