[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: Re: Suppress warning for duplicate index
From: Sigurd Hermansen <HERMANS1 () WESTAT ! COM>
Date: 2009-03-31 15:50:27
Message-ID: FE10F31634E7F34B87AA143D59608541020CAEE0 () EX-CMS01 ! westat ! com
[Download RAW message or body]
I wouldn't lose sleep over an informative but benign warning message. In any event, \
you may be able to subset your append dataset to those tuples without ID conflicts \
using a relatively cheap existential operator:
data work.test (index = (name / unique)) class;
set sashelp.class;
run;
proc append base = work.test
data = class
;
run;
proc sql;
create table uniqueclass as
select * from class as t1
where NOT EXISTS (select 1 from work.test as t2 where t1.name=t2.name)
;
quit;
proc append base = work.test
data = uniqueclass
;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of cu8sfan
Sent: Tuesday, March 31, 2009 11:29 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Suppress warning for duplicate index
Here's my problem: I have a huge dataset with a unique index on it. I append data to \
it. Sometimes there are duplicate indices. It is correct and intended that these \
records are rejected. However there's a warning written to the log. How do I suppress \
this warning?
I know that some of you will answer to write code without warnings. I agree. However, \
for this particular case it has not been feasible. I cannot nodup-sort and merge the \
datasets because they are too huge. Of course I am open for other suggestions.
This is the warning I want to suppress:
data work.test (index = (name / unique));
set sashelp.class;
run;
proc append base = work.test
data = sashelp.class
;
run;
LOG:
4
5 proc append base = work.test
6 data = sashelp.class
7 ;
8 run;
NOTE: Appending SASHELP.CLASS to WORK.TEST.
WARNING: Duplicate values not allowed on index Name for file TEST, 19 observations \
rejected.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: 0 observations added.
NOTE: The data set WORK.TEST has 19 observations and 5 variables.
NOTE: PROCEDURE APPEND used (Total process time):
real time 0.06 seconds
cpu time 0.01 seconds
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic