Hi
I have the following scenario. I am importing a number of files and running the same SAS code on them to obtain a workable format. I've elected to use macros in order to make the code more efficient.
Here is basic layout of the code:
%LET BBK=BBK_MAY;
%LET BBK2=BBK_MAY2;
%LET BBK3=BBK_MAY3;
%MACRO import;
PROC IMPORT OUT= &BBK
......................
......................
RUN;
%MEND import;
%MACRO importandformat;
Data &BBK2; set &BBK;
......................
......................
......................
Run;
proc sql;
create table &BBK3 as
select *
from &BBK2;
quit;
%MEND importandformat;
%importandformat;
Every time I run importandformat macro I get an error for the way I am referencing the macro variables in my PROC SQL.
Can someone help me out with the syntax? Any suggestions are much appreciated.
Thanks
I have the following scenario. I am importing a number of files and running the same SAS code on them to obtain a workable format. I've elected to use macros in order to make the code more efficient.
Here is basic layout of the code:
%LET BBK=BBK_MAY;
%LET BBK2=BBK_MAY2;
%LET BBK3=BBK_MAY3;
%MACRO import;
PROC IMPORT OUT= &BBK
......................
......................
RUN;
%MEND import;
%MACRO importandformat;
Data &BBK2; set &BBK;
......................
......................
......................
Run;
proc sql;
create table &BBK3 as
select *
from &BBK2;
quit;
%MEND importandformat;
%importandformat;
Every time I run importandformat macro I get an error for the way I am referencing the macro variables in my PROC SQL.
Can someone help me out with the syntax? Any suggestions are much appreciated.
Thanks