I'm trying files from a certain directory. There are many files in this directory, but I'm only interested in importing the ones that start "Run2_08". The number of files changes, so I can't hard code the pathnames. I'm trying this solution, but I can't seem to actually import the data. I keep getting a LOST CARD warning and only one file seems to get processed.
Any help?
[pre]
data tmp;
rc = filename("path", "C:\CA_TEMP");
did = dopen("path");
count = dnum(did);
do i = 1 to count;
name = dread(did,i);
if substr(name,1,7) = 'Run2_08' then do;
fc = filename("file", "C:\CA_TEMP\"||name);
do until (eof);
infile file dlm="," firstobs=2 obs=2 dsd missover end=eof;
input date :yymmdd6. Code :$6. Total :8. Neg :8. Pos :8.;
output;
end;
end;
end;
run;
[/pre]
This is my log:
[pre]
NOTE: The infile FILE is:
File Name=C:\CA_TEMP\Run2_080703.txt,
RECFM=V,LRECL=256
NOTE: LOST CARD.
rc=0 did=1 count=30 i=15 name=Run2_080626.txt fc=20036 eof=1 date=17716 Code=MT43 Total=227 Neg=0 Pos=227 _ERROR_=1 _N_=1
NOTE: 1 record was read from the infile FILE.
The minimum record length was 23.
The maximum record length was 23.
NOTE: The data set WORK.TMP has 1 observations and 11 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
[/pre]