Hello,
I have a number of excel files named as file_a, file_b until file_h. I'd like to use a macro do loop to import the files.
Following the code in this link
I write the following code. I also tried to add % before proc import command and it does not work either. That would be great if someone can help here.
Thanks.
%let list = a b c d e f g h;
%local i next_name;
%let i=1;
%do %while (%scan(&list, &i) ne );
%let next_name = %scan(&list, &i);
proc import out=jobpost&next_name
datafile="H:\bdata\file_&next_name..csv"
dbms='' replace;
run;
%let i = %eval(&i + 1);
%end;