Hi @dsadsad
It seems that you have got a solution, but I would like to explain your problem.
You use 2 functions in the same expression, which means that SAS creates a temporary variable to hold the result of the inner TRANWRD, which is then used as input to the outer TRANWRD. This variable is created with a default length of 200, and there is nothing you can do to change it.
But a workaround is to split the expression in 2 using a temporary column like in this example:
data have;
length a $10 str $500;
do x = 1 to 50;
a = strip(put(x,2.))||'.................';
str = catt(str,a);
end;
run;
proc sql;
create table bad as
select tranwrd(tranwrd(str,'.','-'),'-','+') as str length=500
from have;
quit;
proc sql;
create table good (drop=tmp) as
select
tranwrd(str,'.','-') as tmp length=500,
tranwrd(calculated tmp,'-','+') as str length=500
from have;
quit;
... View more