Please provide us with sample program and sample data next time. What you are asking is a complicated programming task and we would need that info to be able to guide you in the right direction. We at the community site are here to help you out. One suggestion I normally have is, make sure you consider taking SAS training courses. These SAS training courses give you the tools to tackle any project back at work. If you like , i can assess your training needs and give you some course suggestions.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.