BookmarkSubscribeRSS Feed
tparvaiz
Obsidian | Level 7

Hi,

 

I have a sas program that saves a file. when I run it, and if the file exists, it confirms before overwriting.

 

is there a way to disable this and let excel to overwrite if the file with the same name exists

 

Thanks

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

Could you please let me know the program or log info which you are using to run. This will help us to give better response.

Thanks,
Jag
Shmuel
Garnet | Level 18

Add the REPLACE option to your FILENAME statement.

Reeza
Super User

@tparvaiz wrote:

 

is there a way to disable this and let excel to overwrite if the file with the same name exists

 

Yes, the REPLACE option. Exactly where it goes depends on how you're 'saving' your file.

PS. It would really be nice if you take the time to detail your problem rather than rushing to post a question. A good question will include the code and log if applicable or screenshots of errors if it's a pop up for example. And what you've tried so far. I guarantee if you do this you'll answer half your questions before they're posted. In addition asking if 'is there a way' or 'is it possible' the answer is usually YES. You're question is 'how do I do X with Z'. This actually requires a change in thinking because all of a sudden almost everything is possible, it becomes a matter of difficulty. Some may not be at the moment, but again changing how you frame the question also changes how it sounds to you, your colleagues and supervisors. It seems small but these are the things that will differentiate a good programmer from a mediocre programmer. 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 831 views
  • 2 likes
  • 4 in conversation