Hi,
I have a task that requires me to merge 4 different data sets. Names of the data sets are A, B, C and D. They all have a common variable ID, age, hours, lname, fname. They each got their own unique variables such as uniqueA, uniqueB, etc. The objective of the task is to merge all 4 data sets into 1 master data sets ABCD.
I realized that with merge you will loose the value of the variable if they are the same. For example,
data ABCD;
merge A B C D;
by ID;
run;
with the above code, if the value of age is 26 in A, 28 in B, 29 in C, and 30 in D, in the master data set ABCD, the value for age will be 30. My question is, how do I create a master data set with all four data sets A, B, C, and D?
I have a task that requires me to merge 4 different data sets. Names of the data sets are A, B, C and D. They all have a common variable ID, age, hours, lname, fname. They each got their own unique variables such as uniqueA, uniqueB, etc. The objective of the task is to merge all 4 data sets into 1 master data sets ABCD.
I realized that with merge you will loose the value of the variable if they are the same. For example,
data ABCD;
merge A B C D;
by ID;
run;
with the above code, if the value of age is 26 in A, 28 in B, 29 in C, and 30 in D, in the master data set ABCD, the value for age will be 30. My question is, how do I create a master data set with all four data sets A, B, C, and D?