BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DanielMarina
Calcite | Level 5

Hi there,

 

I've just encountered a very strange behavior of SAS when performing an import.

After succesfuly importing the first file, after a while I had to change it due to updates but when the source file was changed performing the same import on the same table generated a "NOTE: Import cancelled.  Output dataset WORK.NTB already exists.  Specify REPLACE option to overwrite it." and the script continued without a problem as nothing important had happend although the entire analysis was peformed on the old data.


How is it possible to throw a NOTE instead of an ERROR (or even an Warning) in such situations? Is this the normal behavior of SAS? because I find it very odd and I cannot imagine a single situation where such outcome it's desirable. Basically if you forgot to mention the "replace" options SAS doen't think it's a critical situation and makes you think everything was fine. 

 

Thank you for your help.

 

EG version  7.15 HF7, SAS 9.4

2019-09-17.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You might want to address you concerns to SAS technical support, where the information might reach the right decision makers. We here in the SAS Communities aren't really the right people to address this issue to; we can't make any changes based upon your concerns.

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

You might want to address you concerns to SAS technical support, where the information might reach the right decision makers. We here in the SAS Communities aren't really the right people to address this issue to; we can't make any changes based upon your concerns.

--
Paige Miller
Tom
Super User Tom
Super User

It seems to be pretty clear to me.  You asked IMPORT to create a dataset, but that dataset already exists so the PROC did nothing.

 

If you want it to automatically delete the existing dataset the add the REPLACE keyword to the PROC IMPORT statement. 

 

SAS is a hodge-podge of many different programs built up over the years by multiple teams of programmers.  It is best to just understand how it works and not worry too much about trying to understand what decisions the various design teams have made over the years.

Kurt_Bremser
Super User

Conditionally delete the dataset before the import:

%if %sysfunc(exist(ntb)) %then %do;
proc delete data=ntb;
run;
%end;

But you're right. That should cause a WARNING in my opinion.

DanielMarina
Calcite | Level 5

Thank you all for your help.

I’m happy to inform you that this behavior has been submited to SAS and has been accepted by R&D / product management and message will be re-classified from NOTE to ERROR.

Somewhere in the future 🙂

Cheers

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 3029 views
  • 5 likes
  • 4 in conversation