Date: Tue, 29 Feb 2000 14:29:10 -0500
Reply-To: "Miller, Scott" <scott.miller@CAMCARE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Miller, Scott" <scott.miller@CAMCARE.COM>
Subject: Re: Creating a sequential number for each observation in a by gro
up
Content-Type: text/plain; charset="iso-8859-1"
first sort the data by your 'by' variable...
proc sort;
by a;
run;
then us the _n_ to get your sequential numbering
idnum=_n_;
Scott D. Miller, M.A.
Medical Informatics Analyst/SAS Programmer
Center for Health Services and Outcomes Research
CAMCARE Health Education and Research Institute
304 388-9918
"Every good scientist is one part B.F. Skinner and one part P.T. Barnum"
Another Month Ends...All Targets Met...All Systems Working...
All Staff Eager and Enthusiastic...All Pigs Fed and Ready to fly
-----Original Message-----
From: EMRAIN [mailto:emrain@AOL.COM]
Sent: Tuesday, February 29, 2000 2:19 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Creating a sequential number for each observation in a by group
I need to creat a sequential number (starting at 001) for each observation
in a
By group. I know there is an easy answer and I am just missing it. Thanks
in
advance.
Ellen