Hi Okay, now I'm having difficulty with the lines to get the data. You indicate that the first lines should be: %macro imports; I believe there is an error in that the delimiter line has a ; as %do i=1 %to &total.; data nxg1; infile " \\XXXXX\YYYYYY\&&fname&i" delimiter = "09"x ; missover dsd lrecl=32767 firstobs=1; well as after firstobs but I corrected that in mine and changed the infile location. But it still appears that something isn't closed because the font isn't changing for the run statement, and in fact nothing happens when I run it. My code is as follows: filename files pipe 'dir /b "F:\TEST\Data\Corrections\*.txt"'; data _null_; infile files truncover end=last; input fname $10.; i+1; call symput("fname"||trim(left(put(i,8.))),trim(fname)); if last then call symput("total",trim(left(put(i,8.)))); call symput("fnamedate"||trim(left(put(i,8.))),substr(trim(fname),15,8)); run; %macro imports; %do i=1 %to &total.; data nxg1; infile "F:\TEST\Data\Corrections\&&fname&i" truncover LRECL = 5000 firstobs=2; input @1 Chart $6. @7 Acct $6. @13 Sex $1. @14 Age $2. @16 DataA $2. @18 DataB $2. @20 DataC $2.; run; Any assistance is greatly appreciated.
... View more