06-23-2016 06:45 PM
I am merging two rather large datasets each of which contain 4,000 variables and they both have the same variable names.
Given the large number of variables, I am wondering if there a SAS procedure that would allow me to rename all of the variables in a single dataset at once? Perhaps by adding a simple suffix or prefix?
I Googled around and found some PROC SQL options however, I am simply not familiar with SQL so the code was not very clear.
I am using SAS version 9.
Any help or references would be appreciated.
06-23-2016 06:49 PM
If they have the same variable names are you sure you want a merge and not an append?
Although it doesn't matter for this question you a SAS version is along the lines of 9.3 or 9.4 not just 9.
06-23-2016 07:01 PM
06-24-2016 01:33 AM
Well, that's quite simple, then.
data family; set mothers children ; run; proc sort data=family; by family_id; run;
06-24-2016 04:25 AM
4000 variables in multiple datasets, that really does not sound like an efficient or easy way to be working. Personally I wouldn't work with any dataset having more than 30 odd variables, its just unworkable. Consider a restructure.