02-22-2018 10:33 AM
I am trying to figure out why below mentioned code is not working (problem occurs at out= statement, when I set out=a by hard, it works but creates just one file clearly...):
%let list_of_names = first second third; %macro _loop(); %do i = 1 %to 4/*%sysfunc(countw(&list_of_names))*/; proc import datafile = "\\someAddress\%scan(&list_of_names, &i).csv" out=%scan(&list_of_names, &i) dbms=csv replace; getnames=yes; run; %end; %mend _loop; %_loop();
Thanks for your suggestions!
02-22-2018 10:47 AM
02-22-2018 10:52 AM - edited 02-22-2018 10:55 AM
I assume its problem is a string dsn starting with int..looks like I will have to rename it in some way, otherwise there is some other option...?
Need further help from the community? Please ask a new question.