In reply to mary.

I think the best way to get your question answered is to post sample data and the desired end result to the SAS Support Community.