LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Feb 2001 03:29:54 -0500
Reply-To:     Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:      Re: Determine which variable is wrong

On Mon, 19 Feb 2001 08:16:59 +0100, ROTH Fabrice <fabrice.roth@STATEC.ETAT.LU> wrote:

>--------------69F892EFB37590B35E14ACE8 >Content-Type: text/plain; charset=us-ascii >Content-Transfer-Encoding: 7bit > >Hi all > >I was wondering if it was possible to determine which variable was wrong >in a merge statement. > >I Have that piece of code; > >data check_cartec; > merge rp011.imlist(in=a) imlist_cartec(in=b); > by com qr loc im men; > > if a and not b then > do; > obs=_n_; > err="Men pas dans la CarteC"; > output; > end; > >run; > >where both datasets are sorted by com qr loc im men (Their only >variables) >What I want to find out now is why the "if-statement" resolved as true, >that is >whether the com-variable is different in both data-sets, or qr or loc >... > >Is there any way to do this ? > >Thanks >-- >ROTH Fabrice > >

One idea: add a control variable for each variable of the datasets, which is unique to the datasets:

... acom=com; aqr=qr ...

The same for the other: bcom=com; bqr=qr; ...

after the merge you have all the information you need. E.g. if acom is missing and bcom not, it was not in a, but in b...


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