Date: Tue, 20 Sep 2005 06:29:41 -0700
Reply-To: Toby <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Toby <tobydunn@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: add an index column
In-Reply-To: <20050920064915.85092.qmail@web53801.mail.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Patrick,
All you need to do is something like the following:
Data one (index = (IndexVar)) ;
set something ;
IndexVar = compress("Example_"||_n_) ;
run ;
Toby Dunn
Hi there,
I would like to add an INDEX column (to index each row/example) into an
existing dataset. So, the first column would be in the form as floow:
example_1
example_2
example_3
example_4
example_5
I tried to use DATA step with SET statement but the index does not
increment. Could some please please help?
Thanks
Patrick Tran