I have 2 datasets with the following variables: DatasetA - ID, Name DatasetB - ID, Name, Parent_ID, Parent_Name I want to keep merging and tracing the relationship between the ID and Parent_ID up to 5 times, like a family tree. My output dataset should have columns like this: ID, Name, Parent_ID, Parent_Name, Parent_ID1, Parent_Name1, Parent_ID2, Parent_Name2, Parent_ID3, Parent_Name3, Parent_ID4, Parent_Name4 Currently I create multiple data steps. Step 1: Match ID (dataset A) with ID (dataset B). Step 2: Match Parent_ID(dataset A) with ID (dataset B) and rename Parent_ID from dataset B to Parent_ID1. Step 2: Match Parent_ID1with ID (dataset B) etc.
... View more