Learning SAS? Welcome to the exclusive online community for all SAS learners.

tranwrd

Accepted Solution Solved
Reply
Contributor
Posts: 36
Accepted Solution

tranwrd

Can't tranwrd use variable as argument?

data test;

     length tar rep $20. source out $100. ;

     source ='abc*def';

     tar = 'abc';

     rep = '12';

     out = tranwrd(source, tar, rep);

run;

thanks.


Accepted Solutions
Solution
‎02-20-2015 05:56 PM
Super User
Super User
Posts: 7,060

Re: tranwrd

Since TAR is length 10 you are looking for 'abc       ' instead of 'abc'.

out = tranwrd(source,trim(tar),trim(rep));

View solution in original post


All Replies
Solution
‎02-20-2015 05:56 PM
Super User
Super User
Posts: 7,060

Re: tranwrd

Since TAR is length 10 you are looking for 'abc       ' instead of 'abc'.

out = tranwrd(source,trim(tar),trim(rep));

Contributor
Posts: 36

Re: tranwrd

Thank you soooooooooo much!!!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 302 views
  • 1 like
  • 2 in conversation