Date: Thu, 10 Jan 2008 02:21:56 -0800
Reply-To: lourens <lourens_walters@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: lourens <lourens_walters@YAHOO.COM>
Subject: Adding a new variable without deleting indexes
Content-Type: text/plain; charset=ISO-8859-1
I would like to know if it is possible to update a dataset by adding a
new variable to the dataset, without deleting all the indexes on the
dataset. I have a dataset, call it data1 and another, call it data2.
data1 is very large and has several indexes on it - which took some
time to create. I need to update data1 by adding a single variable
contained in data2 to all records matching on a composite key.
I have not been able to figure out how to do this without having to
recreate data1 with the new variable from data2 included, and then
having to recreate the indexes. This frustrates me as I don't like the
idea of having to recreate the indexes every time I need to add a
variable to the dataset - the new variable has no relation to any of
the index keys, so should not affect update times.
I know that I can use the modify statement to update the data set
without losing the indexes, but the modify statement cannot update the
dataset descriptor, and hence I cannot add a variable. If I knew how
to add a variable to the dataset, I could use modify statement to
update the variable values according to composite key matches with