My post got messy up. I repost it.
hI Patrick,
I am sure you are the expert of hash object. Actually my dataset Have2 is even more complicated than I think.
So my datasets are:
data have1;
input empid;
cards;1111
2222
3333
2124
9999;
data have2;
input mgrid_1 mgrid_2 mgrid_3 mgrid_4 mgrid_5;
cards;
101 1111 1212 2124 14322
201 2211 2222 3434 5656
301 3322 2124 5434 3333
401 3355 1199 55 77
234 2222 2323 2121 55;
I have added the last row into the dataset have2 to show the complexity of my dataset. 🙂
When this look-up process executes, note that value 2222 appeares at two spots in the dataset have2.
One in column mgrid_2 and the other one in column mgrid_3.The result I want to see would be like:
emplid mgrid col
1111 101 1
2222 2211 2
2222 234 1
3333 5434 4
2124 3322 2
The Column col I would like to add into the want dataset is the level of the manager from Have2 dataset.Hope you could help me out again.
Thanks a lot.