BookmarkSubscribeRSS Feed
nbirkett
Calcite | Level 5
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;
2 REPLIES 2
Patrick
Opal | Level 21
Hi

I don't really understand how "filename outprint CLEAR;" would delete any listing output. Doesn't it just clear the output path for listing output without affecting listing output already created?

Another thought: Is there a reason for using "noxwait"? May be running things with options "xwait" and "synch" could resolve the issue. Just thinking that a change in the environment might have slowed down things so that you're now trying to delete stuff before it actually got released - just guessing here.

HTH
Patrick
nbirkett
Calcite | Level 5
Yes, I agree with you. The 'filename' was included just to delete the name allocated to the output. The deletion occurred in the previous code fragment.

I will look into the 'noxwait' suggestion. Thanks.

Nick.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 790 views
  • 0 likes
  • 2 in conversation