Date: Fri, 30 Jul 2004 08:29:03 +0200
Reply-To: "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Subject: Re: Data extraction from column
Content-Type: text/plain; charset="iso-8859-1"
I think you want a sequence number per ID, is that right? If so then take care your dataset has been sorted according to ID (and other relevant variables) and (*untested*):
SET Old; BY ID;
IF (FIRST.ID) THEN Sequence = 0;
Sequence + 1;
You may add this code to some other already existing data step.
If this is not what you wanted, then please clarify.
Regards - Jim.
. . . . . . . . . . . . . . . .
Jim Groeneveld, MSc.
6825 MJ Arnhem
Tel: +31/0 26 376 7365
Fax: +31/0 26 376 7305
My computer says 'beep'. What's wrong with that? It's talking too much!
From: Nidal AL-Huniti [mailto:nidal-al-huniti@UIOWA.EDU]
Sent: Thursday, July 29, 2004 22:47
Subject: Data extraction from column
I am trying to extract a new variable based on patient ID. Sample data looks
ID age liver function
123456 3.0 150
123456 4.0 160
123456 4.6 170
I want to create a new variable based on ID #. So for a given ID # I
would have only ONE # (subject #)
Your help is greatly appreciated,