In reply to Simou. Hi Simou, it looks like there are several problems here -- or maybe you shared an incomplete version of the code.

Your macro is not defined to take a parameter, but you provided one in the call -- %layout(Comp).

You don't have an I or J variable, but you reference them in DROP statements.

You don't need a QUIT statement for this step.

I think there is more going on in your session, maybe you had an open step or statement that wasn't closed (missing paren or semicolon) from a previous step. You should reset your SAS session and re-run, after addressing the issues I mentioned.