Hi everyone,

I am using a macro to change the layout of my dataset. However, I get the following error message:

180: LINE and COLUMN cannot be determined.
NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN
where the error has occurred.
ERROR 180-322: Statement is not valid or it is used out of proper order.

/* Here is my code*/
%Macro layout;
%do i=1 %to 50;
Data NewComp&i; Set Comp&i;
%if _n_=1 %then Comp_Name=B;
%if _n_=5 %then Code=C;
Rename A=Shareholder_Id; Label A='Shareholder_Id';
Rename B=Shareholder_Name; Label B='Shareholder_Name';
Rename C=Country; Label C='Country';
Drop I; Drop J;
Run;
quit;
%end;
%MEND layout;
%layout(Comp);

Do you any ideas about how this problem can be solved?