options mprint mlogic symbolgen;
%do i=1 %to &val;
%LET m=%SCAN("&mvar",&i," ") ;
%LET k=%SCAN("&mvar1",&i," ") ;
F8=TRANWRD(a,trim(&k),trim(&m));* here this function is not working but htere is no error in log as well tried compress and other vars as well but nothing is working is there any other function also to replace the word in a string;
/*this is working fine without macro or do loop if we pass the var names manual.*/
I already found the solution, I was using different variable but I should use the same variable in tranward function so that it should not be overwritten each time with the loop.If we use the same variable it will it will be updated everytime with the loop.