LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 31 Mar 2009 11:50:27 -0400
Reply-To:     Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:      Re: Suppress warning for duplicate index
Comments: To: cu8sfan <cu8sfan@GMAIL.COM>
In-Reply-To:  <fa39da49-8ec5-4d75-96d7-0d4e7bb6074f@y9g2000yqg.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

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


Back to: Top of message | Previous page | Main SAS-L page