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 (May 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 16 May 2002 11:57:17 -0400
Reply-To:     John Genzano <jgenzano@GENZANO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         John Genzano <jgenzano@GENZANO.COM>
Subject:      Re: Creating duplicate records
In-Reply-To:  <OFD4525F3D.8A74B234-ON86256BBA.007CA0C1@household.com>
Content-Type: text/plain; charset="us-ascii"

Even easier, just output the record a second time. You could even change the one parameter on the first pass, like the following:

data temp; set original; by dose; output; if first.dose then do; CMT = 'new value'; output; end; run;

John J Genzano, III Principal Consultant Genzano Software Consulting 610-517-2591 SAS Certified Professional, V6

"The right to be heard does not automatically include the right to be taken seriously." - Hubert Humphrey

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Prasad Ravi Sent: Wednesday, May 15, 2002 6:44 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Creating duplicate records

Daren:

Simple way to do this is to output all the single.dose records into another temporary dataset and append it to the original dataset.

Like:

data temp; set original; by dose; if first.dose then output; run;

proc append base=original data=temp; run;

Prasad Ravi

Daren Austin To: SAS-L@LISTSERV.UGA.EDU <daren.austin@LIN cc: EONE.NET> Subject: Creating duplicate records Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.U GA.EDU>

05/15/2002 03:17 PM Please respond to Daren Austin

For some obscure reason I need to INSERT duplicates of a record at certain points in a database with a single variable changed (I'm creating a control file for a pharmacokinetic analysis using NONMEM if that means anything to anyone here). Could someone point me in the correct direction please.

Essentially I want something like:

if first.dose then... duplicate this record only

The record will ultimately not be exactly identical but I'll change the single parameter (called CMT) on a second data step.

I searched the archive and there is plenty on removing them :-)

Kind regards,

Daren


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