Sounds like you are not setting the macro variable.
Would need to see the actual code you used, but if you are trying to use CALL EXECUTE to call a macro once for each observation in a dataset with a list of datasets then make sure to use %NRSTR() around the macro call to prevent timing issue.
So instead of doing something like:
data _null_;
set filelist;
call execute('%mymacro('||dataset||')');
run;
Add %NRSTR() like this:
data _null_;
set filelist;
call execute('%nrstr(%mymacro)('||dataset||')');
run;
Plus your SAS log will much easier to read:
+ %mymacro(dataset1)
+ %mymacro(dataset2)
...
... View more