Hi:
This isn't really an ODS or BASE Reporting Procedure question. However, here's a quick example to point you in the right direction.
To concatenate macro variables together, you would do something like this:
[pre]
*** concatenate macro variable example;
%let one = kermit;
%let two = the;
%let three = frog;
%put ******** check resolution **********;
%put one=&one two=&two three=&three;
%let phrase = &one &two &three;
%let alt = &one, &two$ &three!!!;
%put ******** check resolution **********;
%put phrase=&phrase alt=&alt;
[/pre]
And then in the SAS log, you will see the following:
[pre]
499 *** concatenate macro variable example;
500
501 %let one = kermit;
502 %let two = the;
503 %let three = frog;
504
505 %put ******** check resolution **********;
******** check resolution **********
506 %put one=&one two=&two three=&three;
one=kermit two=the three=frog
507
508 %let phrase = &one &two &three;
509 %let alt = &one, &two$ &three!!!;
510
511 %put ******** check resolution **********;
******** check resolution **********
512 %put phrase=&phrase alt=&alt;
phrase=kermit the frog alt=kermit, the$ frog!!!
[/pre]
Note how the punctuation (, $ !!!) in the %let statement:
[pre]
%let alt = &one
, &two
$ &three
!!!;
[/pre]
gets put into the new macro variable &ALT:
[pre]
alt=kermit
, the
$ frog
!!!
[/pre]
For more help with this task, for example, using a MACRO %DO loop or using %IF or writing a macro program to automatically validate and build your new macro variable, your best bet for help is to read the SAS Macro documentation or to contact Tech Support:
http://support.sas.com/techsup/contact/index.html
cynthia