I am using the following Macro that uses filename pipe. But get an error saying invalid option name "dir", etc. I suspect it could be due to the quotes while defining filename and pipe. I am not sure how to have it so that SAS doesnt recognize dir as an option. I tried to remove the quote, removing %bquote and having just the double quote, but still keep getting the errors. I am using Windows, but will also be running it remotely on Linux. Any thoughts would be deeply appreciated. Thank you so much for your time. %macro setprogvar(dateval); %global date; %let date=&dateval; %put &date; %put &dateval; %let filepath = %bquote("C:\Research\SASDataSets\bulk all data &date"); filename CDR_Bulk pipe "dir &filepath /a:-d-h-s /b /s"; %mend setprogvar; %setprogvar(20100331); ***LOG************ 1 filename CDR_Bulk pipe "dir &filepath /a:-d-h-s /b /s"; --- 23 ERROR 23-2: Invalid option name dir. 1 ! filename CDR_Bulk pipe "dir &filepath /a:-d-h-s /b /s"; - 23 ERROR 23-2: Invalid option name a.
... View more