First let's clean up the obvious typos in your posted code and try it.
2129 %let have = a,b,c;
2130 %let want = %sysfunc(tranwrd(&have,',',' '));
ERROR: The function TRANWRD referenced by the %SYSFUNC or %QSYSFUNC macro function has too many
arguments.
Because &HAVE contains commas the TRANWRD() function is seeing way too many commas. You can add some macro quoting to prevent that.
2134 %let have = a,b,c;
2135 %let want = %sysfunc(tranwrd(%quote(&have),',',' '));
2136 %put &=want;
WANT=a,b,c
But notice that it did not change anything. That is because your macro variable does not contain the any commas that are enclosed in single quotes. Since to macro code everthing is a character string you do not need to use quotes around string literals. But you will need to macro quote both commas and spaces to get them to be treated as text instead of delimiters.
2137 %let have = a,b,c;
2138 %let want = %sysfunc(tranwrd(%quote(&have),%str(,),%str( )));
2139 %put &=want;
WANT=a b c
... View more