?
Solved

Any SAS programmer to help

Posted on 2006-03-28
3
Medium Priority
?
300 Views
Last Modified: 2010-04-17
I have a set of 50 observations. Once I read them they are read into the data set. The main variable is say TreatmentTime

Apart from that I also want to create a variable tempIndex which is say 1 for observation 1 , 2 for observation 2 and so on. So that I can use tempindex for other calculations. How do I do that

thanks
-anshuma
 
0
Comment
Question by:anshuma
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
tobydavid earned 2000 total points
ID: 16332821
SAS uses the temporary variable _N_ as a counter.  To save this as a permament variable, just assign it.

DATA NewDataSet; SET YourDataSet;
Tempindex = _N_;

0
 

Author Comment

by:anshuma
ID: 16338083
Hi,

I am just getting started with SAS. I hope you will try to help me in future also.

sincere regards
-anshu

0
 
LVL 4

Expert Comment

by:tobydavid
ID: 16342203
My pleasure.  I like SAS a lot and have been using it for many years.

-- tobydavid
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Starting up a Project

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question