I have a SAS programme which I have to submit to a remote site to execute. In order to preserve my log/print output, I use O/S commands to delete and create them (see below for code). This has worked fine for several months and continues to work on my test machine. But, for the past two weeks, the remote site has been unable to delete the log/print files after my programme has completed. They get an error saying that the file is still in use. They are storing the files on a network server, not a local machine.
Any advice/suggestions would be appreciated.
Nick.
options noxwait;
data _null_;
command = "rmdir /S /q &location_results";
call system (command);
command1 = "mkdir &location_results";
call system (command1);
run;
proc printto;
run;
filename outlog CLEAR;
filename outlog "&location_results\log_cohort1_mf.txt";
filename outprint CLEAR;
filename outprint "&location_results\print_cohort1_mf.txt";
proc printto new log=outlog print=outprint;
run;