For your second question with regards to merge rows and columns, you will need to provide further information, I see none of this in the attached file you posted. Generally speaking, merging cells is an Excel function not replicatable from SAS, however there are ways around this such as setting up columns which look like how you want the output to look.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.