The plot thickens: a web search on the phrasing from the question found one hit: right in the middle of Ron Cody's book Learn SAS Programming by Example. It's an exercise from one of the chapters. The answers to odd-numbered problems are available for anyone to download from the support.sas.com/cody web site.

But this question is from an even-numbered problem! I was able to sneak around over here and locate the intended solution though, from a file usually supplied only to professors by request.

So was my solution similar to the one that Ron Cody supplied? I'm not telling.