TedCarol:
Have you tested the programs?
Which one of the two outputs is your choice?
Does it scale up to your data set?
You are asking for help. When help comes and if it is right, share your joy with SAS Community. If the help is not right for you, come to SAS Cmmunity and give your expected output data set and ask for a suitable and acceptable answer.
... View more