in reply to Reverse engineering a formula...
First of all, 'clunky old EBCDIC' systems still run most of the financial world. Companies like BankofAmerica, Amex, and Visa seem to think they're pretty OK.
You're very likely fighting the system, and not using it the way it's designed. OS/390 applications are very batch-centric, sort of similar to the way Unixy things are pipe-centric. I can practically guarantee you that there is a batch interface to what you want to do. Gen one job, or one step per lease and let 'em rip. Google for 'IBM JCL' to get started.
Finally, make sure your managment (and you) understand that you're just making up the lease calc if you go that route. This is money you're dealing with, and money mistakes tend to piss people off in a way that nothing else does. Be *very* careful to have your work audited by a bean-counter who knows what they're doing.