Use the compress() function within a %SYSFUNC to remove the parentheses from A and B...
You need to use %( and %) to represent the parentheses and prevent them from being interpreted as the closure of the %SYSFUNC.
%LET A = ('a','b','c') ; %LET B = ('d','e','f') ; %LET A2 = %SYSFUNC(compress(&A,%(%))) ; %LET B2 = %SYSFUNC(compress(&B,%(%))) ; %LET C = (&A2,&B2) ; /* or all in one... */ %LET C = (%SYSFUNC(compress(&A,%(%))),%SYSFUNC(compress(&B,%(%)))) ; %PUT &C ; Macro variable C resolves to ('a','b','c','d','e','f')
Incidentally, if you intend on using &C in an in() condition, it will work as-is, i.e.
%LET A = ('a','b','c') ; %LET B = ('d','e','f') ; %LET C = (&A,&B) ; data test ; letter = 'd' ; exist = letter in &C ; /* resolves to (('a','b','c'),('d','e','f')) */ run ;