Hello everyone, I hope you are all well. I have an issue with reading multiple data files in SAS. I tried many methods but it is not working. Here is an example of the code that I used. It worked with .txt files but I tried only with 5 files. Method 1: %let dirname = E:\Data\Lisbon; filename DIRLIST pipe "dir /B &dirname\*.tas"; data dirlist ; length fname $256; infile dirlist length=reclen ; input fname $varying256. reclen ; run; data all_tas_lisbon (drop=fname); length myfilename $100; length name $25; set dirlist; filepath = "&dirname\"||fname; infile dummy filevar = filepath length=reclen end=done DSD dlm= ',' TRUNCOVER; do while(not done); myfilename = filepath; length date 8 time 8 cpf $1 cnt $3 ba $1; informat date ED yymmdd8. time time8.; format date ED yymmdd10. time time8.; retain date; if _n_=1 then do; input //date//; end; input time cpf $ cnt $ ED vol ba $ price var1; output; end; run; The data was incomplete and there is what I read on the log window: NOTE: Variable name is uninitialized. NOTE: The infile DUMMY is: Filename=E:\Data\Lisbon\s_equities_20080101.tas, RECFM=V,LRECL=256,File Size (bytes)=60, Last Modified=04 March 2008 11:10:46 o'clock, Create Time=11 March 2014 22:27:05 o'clock NOTE: LOST CARD. Thank you in advance for your precious time and help.
... View more