by BillyBoyo » Thu Oct 06, 2011 3:26 pm
Assuming that neither a nor b are constant:
You could call a Cobol/other language program to do the calculation - against this, the limits to access that you have stated;
You could calculate "in a loop", with, if a non-integer b, a final adjustment - against this, potential for introducing differences simply through calculation method vs function in some other language (you would have had an element of this anyway, probably);
You could us a file of logarithm data - against this, you say "everything has to be done on the mainframe", but in it's favour, you can do it on the mainframe if you are allowed to create a file in the target environment;
You can put your log data in an instream table;
You can put your log data as DD * data (not requiring an actual file to exist);
You can output your data to a CSV - against this, you say "everything has to be done on the mainframe", if you can explicitly confirm that you are unable to download data from the mainframe to a PC then we can forget this one.
One of the "bolded" options seems most likely since if "everything has to be done on the mainframe" and other options are precluded, then this seems a reasonable way.
Are you familiar with an Easytrieve TABLE file? The other possibility is with OCCURS.
The normal two-dimensional format of a printed log-table better fits the OCCURS, but we have computers, so turning two-dimensions into one is not beyond the possible.
Also you need to be able to get a table someone on the mainframe so you can get it in your program. If you can do that, it probably can be done with "logs" and some not over-complex coding.