Hi,
I hope anyone could help me out with the following. I want to read multiple files (from 1 till 30), placed in 1 dir, with the use of macro's (best way to do this I think). But... my version of the program only generates errors (by the way; I haven't looked yet for a solution to go over the 10, so I'll use i=1 to 9). It doesn't recognize the filename with the &i in it...:
%macro import_files;
%do i=1 %to 9;
PROC IMPORT DATAFILE= 'L:\8th\TEST REQUESTS\03 Graphs\Financieel_AB_401_Day_0&i_09_2009.csv'
OUT= work.AB_401_&i
DBMS=DLM REPLACE;
DELIMITER='3B'x;
GETNAMES=YES;
DATAROW=2;
RUN;
%end;
%mend;
%import_files
I hope anyone could help me out with the following. I want to read multiple files (from 1 till 30), placed in 1 dir, with the use of macro's (best way to do this I think). But... my version of the program only generates errors (by the way; I haven't looked yet for a solution to go over the 10, so I'll use i=1 to 9). It doesn't recognize the filename with the &i in it...:
%macro import_files;
%do i=1 %to 9;
PROC IMPORT DATAFILE= 'L:\8th\TEST REQUESTS\03 Graphs\Financieel_AB_401_Day_0&i_09_2009.csv'
OUT= work.AB_401_&i
DBMS=DLM REPLACE;
DELIMITER='3B'x;
GETNAMES=YES;
DATAROW=2;
RUN;
%end;
%mend;
%import_files