Date: Tue, 5 Aug 2008 18:04:55 -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: How to add repeated ID - data management
Content-Type: text/plain; charset="us-ascii"
Please be more specific:
- is the large data file a text file, a SAS dataset, or other?
- do you have an electronic version of a report or display that has a
header with an ID followed by lines of data related to that ID?
- do you have a way to show the before and after row structure? (In my
copy of the e-mail, the data lines run together.)
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of jn
Sent: Tuesday, August 05, 2008 4:52 PM
Subject: How to add repeated ID - data management
Hello SAS-Ls,I have a large data file. Each patient has multiple line of
his disease, but each patient has only one ID on the 1st line. I need to
add his IDto all his disease lines. How do I add the ID to all lines in
SAS code? And patients have differentnumber of lines, some have 3 and
some have only 1.My data format is below:ID var1 var21 ER A ER
B ED C2 ER D OP EWhat I need is below:ID Var1 var21 ER
A1 ER B1 ED C2 ER D2 OP E Thanks much!Jane