Along with the suggestions so far, you can also use a lookup table. Quick
data newdata ;
set a ;
do Loop = 1 to Number_of_Records;
set b nobs=Number_of_Records point=Loop;
if id_a = id_b then
...do your work here.... ;
Keep in mind that you are reading b every time a record in a is processed.
The number of records in b read is dependent on where it occurs.
"Bridging SAS and Microsoft Technologies"
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Jason
Sent: Tuesday, April 26, 2005 8:52 AM
Subject: A simple question on data manipulation
I have a simple question. Suppose I need to generate some observations in
data set A, but for each observation I need to use the values in another
data set B for calculation. What's the best way to do it? e.g. I need to
generate 200 numbers in data set A, but each number is calculated by using a
value in data set B.
I hope I have explained my question. Thanks for your help.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around