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 (January 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Jan 2011 20:29:23 +0000
Reply-To:     "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Subject:      Re: Continuous NUmbers
In-Reply-To:  <AANLkTimo1+PeHjQh00qLo6j=bOmCKXxkjFZWEvpTfXm+@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

From: John Mike Sent: Tuesday, January 11, 2011 2:59 PM 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

to assure that you have one as start and Number-of-rows as your high-value use this program.

Note: Nrows is an _automatic_ variable and is not saved.

DATA Work.NumberedRows; do RowNmbr = 1 to Nrows; set SAShelp.Class nobs = Nrows; output; end; stop; Proc Print data = &SysLast.;

run;

compare to:

DATA Work.NumberedRowsX; retain RowNmbr 0; do until(EndoFile); set SAShelp.Class end = EndoFile; RowNmbr+ +1;*increment RowNmbr; output; end; stop; Proc Print data = &SysLast.; run;

Ron Fehd the unique RowId maven


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