Hi , i was trying to get list of files(.csv) available in Directory including sub folder in SAS,please help me. code %macro list_files(dir,ext); %local filrf rc did memcnt name i; %let rc=%sysfunc(filename(filrf,&dir)); %let did=%sysfunc(dopen(&filrf)); %if &did eq 0 %then %do; %put Directory &dir cannot be open or does not exist; %return; %end; %do i = 1 %to %sysfunc(dnum(&did)); %let name=%qsysfunc(dread(&did,&i)); /* %if %qupcase(%qscan(&name,-1,.)) = %upcase(&ext) %then %do;*/ %if %qscan(&name,2,.) ne %then %do; %put &dir\&name; data _tmp; length dir $512 name $100; dir=symget("dir"); name=symget("name"); run; proc append base=want data=_tmp; run;quit; %end; %else %if %qscan(&name,2,.) = %then %do; %list_files(&dir\&name,&ext) %end; %end; %let rc=%sysfunc(dclose(&did)); %let rc=%sysfunc(filename(filrf)); %mend list_files; %list_files("C:\Users\sivakumar.sivaraj\Documents\Dataset",*) Error - ''The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended'' 1 ;*' _ 49 1 ! ;*";*/;quit;run; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='Program' _______________________________ 49 3 ! ; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 4 %LET _CLIENTPROCESSFLOWNAME='Process Flow'; 5 %LET _CLIENTPROJECTPATH=''; 6 %LET _CLIENTPROJECTNAME=''; 7 %LET _SASPROGRAMFILE=; 8 9 ODS _ALL_ CLOSE; 10 OPTIONS DEV=ACTIVEX; 11 GOPTIONS XPIXELS=0 YPIXELS=0; 12 FILENAME EGSR TEMP; 13 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 14 STYLE=HtmlBlue 15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css") NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks.
... View more