It would be extremely helpful if you showed us the ENTIRE log for this data step (not a small portion of the log).
Also, as far as I can tell, there is no need for %sysfunc here, yet you chose to use it even though no macro variables are present. As far as I can tell, there is no need for %str here, yet you chose to use it even though no macro variables are present. If payment_amount and term are data set variables, %sysfunc and %str cannot access the values of a data set variable. Therefore, %sysfunc sees text as the second argument of the REPEAT function. The text is
term-1
which is not a number, and not a reference to a data step variable, hence the error.
So if you remove %sysfunc and %str and their associated parentheses, this might work.
... View more