Date: Mon, 6 Jan 1997 16:34:21 -0600
Reply-To: trbiddle@niu.edu
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "T.R. Biddle" <a10trb1@CORN.CSO.NIU.EDU>
Organization: ACS at NIU
Subject: How to get values from list?
Content-Type: text/plain; charset=us-ascii
I have a data set (400,000+ records) and a program which runs against it
when I manually assign a valued to two variables, ID1 and ID2. The data
set contains a value in a field ID that is matched with the values
assigned to ID1 and ID2 to select cases for analysis. Multiple cases
will have the same value in the field ID. There are about 20,000
different values for ID. If I were, for example, to assign the value 10
to ID1 and the value 12 to the variable ID2, my program would select all
the cases with those values in the variable ID and perform the
appropriate process. My problem is that I would like to use every
combination of values for ID (which are not sequential) in the variables
ID1 and ID2, and I do not want to enter all these combinations
manually. What comes to mind is that I could create a list of the
values for the variable ID assign the first to ID1 and then loop through
the rest assigning each to ID2 and processing, then assigning the second
value to ID1, loop through the rest, etc. until all combinations had
been processed. I am not sure what the best approach would be using
SAS. Because of the large number of cases, I am interested in doing
this as efficeintly as possible. Could someone point me in the right
direction?
Thanks,
TR Biddle
Academic Computing Services
Northen Illinois University
|