BookmarkSubscribeRSS Feed
morglum
Quartz | Level 8

Hi everyone,

I am currently having issues writing to a PDF when running a program for the second time (after, say, some minor edits) because SAS starts an instance of AcroRD32.exe (acrobat reader) the first time that I have to kill using ctrl-alt-delete. If I dont, I  get "ERROR: file is in use".

Below is a minimal working example under SAS 9.2  2M3.  It will work fine once, but I get "ERROR: file is in use" when trying to run it the second time.  Any idea what I can do?  Thanks,

Simon

-------------

title;

data test;

do i=1 to 10;

  output;

end;

run;

ods pdf file="c:\test.pdf";

  proc print data=test; run;

ods pdf close;

-------------

5 REPLIES 5
ballardw
Super User

You likely have the PDF open in a viewer. Make sure it is not in a viewer before running the code.

This also happens with RTF output and is basically the result of the VIEWER locking the file while open.

morglum
Quartz | Level 8

Hi Ballard,

It is open,but in SAS's result viewer.  I didnt actually open the file myself.

Opening a fresh copy of SAS, then clicking the running man twice will get me an error the second time.

I've added a routine of ctrl-alt-del + killing every AcroRD32.exe process started by SAS before running my program, but it's a pain that I wish I could programatically get rid of.

ballardw
Super User

The ODS results viewer is a viewer and has this behavior except for HTML output.

jakarman
Barite | Level 11

ods noresults?

---->-- ja karman --<-----
jakarman
Barite | Level 11

My intention is to stop the popping up of the results after the process has run.

31789 - ODS output automatically opens in the Results Viewer window even when specifying ODS NORESUL...

In Eguide there also an option of the same kind

No automatic open, no lock, no problem

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 5 replies
  • 1931 views
  • 0 likes
  • 3 in conversation