I'm writing a macro that contains a macro parameter with a list of values, and I want to print each of those values on a separate line of the output file. I've tried using TRNWRD to do this, but the spaces in the list are not being replaced with line returns. Have: List=* 1 2 3 4 * Want: LIST=* 1 2 3 4 * When I run the example code, in which I was trying to use TRANWRD to convert spaces to line returns, I get what I thought was the line return code instead of the line returns: 1'0D0A'x2'0D0A'x3'0D0A'x4 Example Code: %macro test(list);
%Let List2 = %sysfunc(tranwrd(&List,%str( ),'0D0A'x));
data _null_;
put
"LIST=*" /
"&List2" /
"*"
;
run;
%mend test;
%test(1 2 3 4);
... View more