Hi , Sorry for jumping in a bit too late. I have a feeling, you could make the solution less tedious and more effective by using Hashes or formats( as @Reeza )suggested. I hope your solution is working, nevertheless the logic can be hard on the macro processor and the storage of large sets of variable lists in macro vars. Precisely, that invokes heavy macro processor work even before the datastep compiler is involved. I haven't been active here lately however if I find time after my Final exams, I will try out the Hash solution and post it here. Anyways, if i missed out a point or two to read between the lines, kindly ignore my post. My apologies. Regards, Naveen Srinivasan
... View more