That would be very helpful if you could post some real/dummy data to explain your issue.
Here is an example for solving your issue.
data have;
input financed_amount payment_amount term;
cards;
400 100 5
400 200 3
400 300 2
;
filename x temp;
data _null_;
set have end=last;
file x;
length repeat $ 2000;
do i=1 to term;
repeat=catx(',',repeat,payment_amount);
end;
if _n_=1 then put 'data want;';
put 'financed_amount=' financed_amount ';payment_amount=' payment_amount ';term=' term ';irr=irr(1,-' financed_amount ',' repeat ');output;';
if last then put 'run;';
run;
%include x/source;