Since my program allows only a maximum of 12 terms, I can simply change my program as follows:
...
%c(n, Term);
...
where the macro c is changed as follows:
%macro c(t, term);
select (&term);
when (01) EIR&t = INTRR(1,-Orig_Bal,cf&t(1));
when (02) EIR&t = INTRR(1,-Orig_Bal,cf&t(1),cf&t(2));
when (03) EIR&t = INTRR(1,-Orig_Bal,cf&t(1),cf&t(2),cf&t(3));
...
when (12) EIR&t = INTRR(1,-Orig_Bal,cf&t(1),cf&t(2),cf&t(3),cf&t(4),cf&t(5),cf&t(6),
cf&t(7),cf&t(8),cf&t(9),cf&t(10),cf&t(11),cf&t(12));
otherwise put 'ERROR: ' &term=;
end;
%mend c;
... View more