A small issue.
Given below is the extract of my output.
Cust_no   Cust_id 
1000	2	The customer was JANE SMITH and account provided  was 234567 & 678954. A relationship was found between JANE SMITH and GARY JOHNSON. 
1000	2	They are both owners on a deposit account 234567 & 678954.
Now the input table has 2 corresponding rows as below where FLd is the value of the attr. So the value of attr1 is fld1. And I am replacing all occurrences of 'attr' in MSg_TXT with 'fld' .
Cust_no	Cust_TYP	Cust_ID	MSG_ID	MSG_SEQ_NO	MSG_TXT	fld1	fld2	fld3	fld4	fld5	fld6	fld7	attr1	attr2	attr3	attr4	attr5	attr6	attr7
123	EVT	2	238	5	They are both owners on a deposit account 
.	234567	678954	HOUSTON BANKING CENTER, HOUSTON, TX	JANE SMITH and GARY JOHNSON	JANE SMITH	“the customer entered the banking center and requested that the teller explain how to wire funds overseas.”		Account#	Account#	BranchName	EVPartiesInvolved	PARTY NAME	TRMText
123	EVT	2	237	4	The customer was 
 and account provided was 
. A relationship was found between 
.	234567	678954	HOUSTON BANKING CENTER, HOUSTON, TX	JANE SMITH and GARY JOHNSON	JANE SMITH	“the customer entered the banking center and requested that the teller explain how to wire funds overseas.”		Account#	Account#	BranchName	Parties	PARTY NAME	TRMText
And this is my code 
data MYDATA.e_final;
set mydata.e_join;
array fld_nm_var (*) attr: ;
array fld_txt_var(*) fld:;
do i=1 to dim(fld_nm_var);
fld_txt = fld_txt_var(i);
fld_name = fld_nm_var(i);
tfld_name = "<" || TRIM(LEFT(fld_name)) || "/>" ;
msg_txt =tranwrd(msg_txt,trim(tfld_name),trim(fld_txt));
drop i fld_txt fld_name tfld_name;
end;
run;
Thoiugh the inoput table has fld1 = 234567 and fld2 = 678945, when I run this code, it just uses the first Account# it finds which 234567. But I am expecting both acct numbers. For that matter , any attribute that occurs twice in a observation , should be seen as fld1 & fld2 & fld3 etc. 
IS there any way to achieve this? 
Thank you!!!