Good evening, everyone! I hope you can forgive me for the somewhat newbie question, but my Googling abilities have failed to confirm the exact finding for which I'm searching. I have two datasets which need to be merged specifically by ResponseID. However, they have different variables (the second dataset was recently generated with a new and different set of variables). I had originally been hoping to simply paste the new variables to the older dataset, but as it happens, the ResponseIDs came through in a different order than in the original dataset. Is there a dataset merging function in SAS which would merge the datasets *specifically on ResponseID*. I am thinking that SAS has a merging function which would add the new variables to the existing dataset, and match all values for those variables to the order as they appear in the old dataset. As a note, the datasets have the same ResponseIDs (e.g., 1,2,3,4,5 both exist within the two datasets), but in different orders (i.e., the second dataset was produced in order 4,2,1,5,3). See examples of old dataset, new dataset, and desired dataset. Old dataset example ResponseID Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 1 50 50 50 45 0 2 100 90 80 70 60 3 20 0 0 0 0 4 0 0 0 0 0 5 100 100 100 100 100 New dataset example: ResponseID Variable 6 Variable 7 4 10 10 2 50 25 1 60 30 5 100 100 3 0 0 Desired dataset example (but in the actual, non example dataset, this includes 7000 datapoints) ResponseID Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 Variable 6 Variable 7 1 50 50 50 45 0 60 30 2 100 90 80 70 60 50 25 3 20 0 0 0 0 0 0 4 0 0 0 0 0 10 10 5 100 100 100 100 100 100 100 Given the tremendous size of the dataset (as well as a slight time crunch), it is not feasible to execute this task manually (as in, finding each unique ResponseID and matching them to the original dataset's order, then importing the data for the new variables in that matched order). Thanks so much for your time!
... View more