I need to schedule a daily SAS program run to check existence of a file and process it. Somehow, when I run the program in PC SAS , it can get the correct results. But when I use the Windows Task Scheduler to run it, it comes back "File does not exist". Same program. Anyone has any idea what could be wrong? Thanks so much!! %let FileRef="R:\&filename"; %put &FileRef; /**"R:\Account_2021-02-11.txt"**/ %let FR=%sysfunc(dequote(&FileRef)); %put &FR; /**R:\Account_2021-02-11.txt**/ %macro CheckFile; %if %sysfunc(fileexist(&FR)) %then %do; data aa ; infile &FileRef firstobs=2; ; input ............ run; %end; %else %put The file &FileRef does not exist. ; %mend;
... View more