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 (September 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 12 Sep 2003 11:59:28 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: Need a little coding help
Comments: To: "greg.woolridge@TAP.COM" <greg.woolridge@TAP.COM>
Content-Type: text/plain

Use this option to generate a warning next time.

OPTIONS MERGENOBY=WARN;

Paul Choate DDS Data Extraction

-----Original Message----- From: Droogendyk, Harry [mailto:Harry.Droogendyk@CIBC.COM] Sent: Friday, September 12, 2003 11:38 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Need a little coding help

Missing BY on the MERGE is causing your grief.

Add BY PTNO; after MERGE statement.

-----Original Message----- From: Greg Woolridge [mailto:greg.woolridge@TAP.COM] Sent: September 12, 2003 2:29 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Need a little coding help

I know that I must be missing something very basic, but I just can't to make this work.

I have 2 data sets, TEMP_A and PT_NOSD. TEMP_A could have multiple records per PTNO and PT_NOSD has only 1 record per PTNO (I have confirmed this). What I want to do is remove all records in TEMP_A which have a matching value for PTNO in PT_NOSD. The code I have tried to use is:

DATA TEMP_A; MERGE PT_NOSD(IN=P) TEMP_A; IF ^P; RUN;

I have also tried using IF P THEN DELETE; Both forms will remove the first record for a PTNO, but not the others when there are multiple records. What am I missing????

Greg M. Woolridge Manager, Study Programming TAP Pharmaceutical Products Inc. e-mail: greg.woolridge@tap.com phone: 847-582-2332 fax: 847-582-2403


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