Date: Tue, 11 Jan 2011 12:14:25 -0800
Reply-To: Daniel Nordlund <djnordlund@FRONTIER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Daniel Nordlund <djnordlund@FRONTIER.COM>
Subject: Re: Continuous NUmbers
In-Reply-To: <AANLkTimo1+PeHjQh00qLo6j=bOmCKXxkjFZWEvpTfXm+@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of John
> Mike
> Sent: Tuesday, January 11, 2011 11:59 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Continuous NUmbers
>
> How can we generate continous numbers for var seq=1,2,3...unitl end of
> observations
> I need to use retain.
> Thanks
> john
John,
You haven't given us much to go on. So, here is a suggestion:
Data want;
Set have;
Seq = _n_;
Run;
Or
Data want;
Set have;
Seq + 1;
Run;
If that doesn't get you going, then give us example SAS code that provides some context for what you are trying to do. Or have I just done someone's homework? :-(
Dan
Daniel Nordlund
Bothell, WA USA
|