Hi:
This question isn't about ODS or Base Reporting Procedures (PRINT, REPORT and TABULATE).
There is no better documentation on Macro processing than the Macro reference in the documentation, the SUGI and SGF papers that have been written and the books by users on the topic of macro.
This forum posting, in particular, answers your second question about concatenating macro variables together:
http://support.sas.com/forums/thread.jspa?messageID=7694Ḏ
Your first question (about executing code conditionally using macro processing), besides being off-topic is WAY too big a topic to cover here in the forum.
Here are some links to other forums postings that you may find useful:
http://support.sas.com/forums/thread.jspa?messageID=7089᮱
http://support.sas.com/forums/thread.jspa?messageID=6402ᤂ
http://support.sas.com/forums/thread.jspa?messageID=5697ᙁ
This SUGI paper is particularly helpful:
http://www2.sas.com/proceedings/sugi28/056-28.pdf
For more help, you might consider contacting SAS Tech Support.
cynthia