Hi Ksharp, Thanks for the advice. However, when I tried to run this I got errors. Perhaps I'm not doing this correctly: Plus, I dont' want to have to specify the directory in the sas program. filename fname pipe 'dir m:\L01mg300\*.sas /S /b'; data _null_; infile fname; input; call symputx(scan(_infile_,-2,'.\'),_infile_); run; %put _user_; %include "&a1"; Log output: NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.2 (TS2M3) NOTE: This session is executing on the X64_DSRV08 platform. NOTE: SAS initialization used: real time 1.96 seconds cpu time 0.79 seconds 1 filename fname pipe 'dir m:\L01mg300\*.sas /S /b'; 2 data _null_; 3 infile fname; 4 input; 5 call symputx(scan(_infile_,-2,'.\'),_infile_); 6 run; NOTE: The infile FNAME is: Unnamed Pipe Access Device, PROCESS=dir m:\L01mg300\*.sas /S /b,RECFM=V, LRECL=256 Stderr output: There is not enough space on the disk. NOTE: 0 records were read from the infile FNAME. NOTE: DATA statement used (Total process time): real time 0.15 seconds cpu time 0.03 seconds 7 %put _user_; 8 %include "&a1"; WARNING: Apparent symbolic reference A1 not resolved. WARNING: Physical file does not exist, C:\Users\barrisw\&a1. ERROR: Cannot open %INCLUDE file &a1.
... View more