We have a large data set that we are maintaining on a monthly basis. In order to make it more efficient for people on our team to use we are attempting to index it on a few different variables, which initially took quite a long time. I'm wondering if there is a way to update an existing index rather than re-indexing the entire data set every time we append to the data? My thinking is that if we are able to just take the new values in the set and add those to the index we could save significantly on time, but I'm not sure if the syntax exists to do that. I am creating my index with the below code.
data test2 (index=(c1
c2
c3
c4
c5
c6));
set test;
run;
No need to create the entire index again. Use PROC DATASETS like this
proc datasets lib=mylib;
modify test2;
index centiles c1/ refresh;
run;quit;
No need to create the entire index again. Use PROC DATASETS like this
proc datasets lib=mylib;
modify test2;
index centiles c1/ refresh;
run;quit;
To be clear, to update all six indexes of interest, do this.
proc datasets lib=mylib;
modify test2;
index centiles c1/ refresh;
index centiles c2/ refresh;
index centiles c3/ refresh;
index centiles c4/ refresh;
index centiles c5/ refresh;
index centiles c6/ refresh;
run;quit;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.