Jumping in late here, and I realize this is a made up problem, but I cannot imagine what a "real" problem would be that requires these techniques. Could you please @BrahmanandaRao tell us what the "real" problem is?
We have spent a lot of time without a solution so far, and the translation to the "real" problem, whatever it is, may not be trivial. In addition, this strikes me as another example of the XY Problem, and knowing what the "real" problem is would point us in the right direction. In addition, any method that takes a long data set and turns it into a wide data set is a red-flag to me (while there are a few situations where that is necessary, most of the time it is a poor approach that takes you in the wrong direction, and misses easier ways to handle the data).
So to sum up, I think we have spent a lot of time on this, and that time would be better spent working on the "real" problem, not this made-up problem.
Hi Kurt,
I am not getting solution in datastep
You obviously didn't even give it a try, or you would have posted your code and log.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.