DATA Step, Macro, Functions and more

SAS is ignoring the NOREPLACE option

Reply
Occasional Contributor
Posts: 14

SAS is ignoring the NOREPLACE option

Hi All,

I am having problems with the noreplace option, I've nearly wiped out the whole sashelp library so I made a copy of sashelp.shoes and tried one more time to check whether the noreplace was working or not. Still not working and I wonder why!

Please find below the log. Thanks in advance for helping me out with this matter.

108 data shoes;
109 set sashelp.shoes;
110 run;

NOTE: There were 395 observations read from the data set SASHELP.SHOES.
NOTE: The data set WORK.SHOES has 395 observations and 7 variables.
NOTE: Compressing data set WORK.SHOES decreased size by 0.00 percent.
Compressed is 5 pages; un-compressed would require 5 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


111 options obs=0 noreplace;
112 proc sort data=shoes; by region;run;

NOTE: Input data set is empty.
NOTE: The data set WORK.SHOES has 0 observations and 7 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
Super Contributor
Super Contributor
Posts: 3,174

Re: SAS is ignoring the NOREPLACE option

Here's the DOC link for SAS 9.2 -- the reference to "temporary SAS data sets" may be a tad vague though. From the SORT DOC:

Note: If the SAS system option NOREPLACE is in effect, then you cannot replace an original permanent data set with a sorted version. You must either use the OUT= option or specify the SAS system option REPLACE in an OPTIONS statement. The SAS system option NOREPLACE does not affect temporary SAS data sets.


Scott Barry
SBBWorks, Inc.

SORT PROCEDURE: Results: SORT Procedure - see NOTE at bottom of section (pasted above):
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473664.htm
Occasional Contributor
Posts: 14

Re: SAS is ignoring the NOREPLACE option

Thanks!

But now I wonder how I could rewrite sashelp.class and other data sets in the sashelp library?
Super Contributor
Super Contributor
Posts: 3,174

Re: SAS is ignoring the NOREPLACE option

Contact your SAS Admin, identify a suitable backup-copy, and request a restore be performed.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 3 replies
  • 327 views
  • 0 likes
  • 2 in conversation