mathematical functions in Eazytrieve



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

mathematical functions in Eazytrieve

Postby rmateos » Wed Oct 05, 2011 10:03 pm

Hi all!

I would like to use logarithm and exponential functions in EasyTrieve.

Does anybody know how to do it? Which utility should I use?

I can't compile in the mainframe so I can just use JCL and EasyTrieve.

Help me! Thanks in advance!
rmateos
 
Posts: 5
Joined: Thu Feb 10, 2011 4:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: mathematical functions in Eazytrieve

Postby BillyBoyo » Wed Oct 05, 2011 10:36 pm

On the face of it you may be out of luck then. Easytrieve has no mathmatical functions built in.

Perhaps you could calculate your log tables? Or, I guess "out there" somewhere on the internet there must be log tables ready-made, which you could put into a file and access those.

Alternatively, are you able to create a "CSV" file (data with delimiters) and download it to a PC and stick it into a spreadsheet? Then you'll have all the mathematic functions you want.

If you can be more exact about what you are trying to do (if none of the above helps) then maybe we can come up with something else.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: mathematical functions in Eazytrieve

Postby rmateos » Thu Oct 06, 2011 2:10 pm

Hi!

I have already done it using the Taylor's theorem, but I wanted to know if there is an easy way because my code is quite long and difficult to understand.

There is no possibility to download the table because everything has to be done in the mainframe.

I would like to use an exponencial function --> a^b

I appreciate any answer.

Thanks for replying to me!
rmateos
 
Posts: 5
Joined: Thu Feb 10, 2011 4:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: mathematical functions in Eazytrieve

Postby 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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: mathematical functions in Eazytrieve

Postby dick scherrer » Thu Oct 06, 2011 8:53 pm

Hello,

I can't compile in the mainframe so I can just use JCL and EasyTrieve.
Seems odd that you can write Easytrieve, but cannot write cobol. . .

In any case, maybe you can work with someone who CAN compile and implement something callable that will provide the functionality you want. Once implemented, you could call it from your Easytrieve code.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: mathematical functions in Eazytrieve

Postby rmateos » Mon Oct 10, 2011 4:08 pm

Hi all,

I'm working on it. Someone told me that there is a language called REXX, which allows using an exponential function.

If I couldn’t do it with REXX, I would try with the possibilities that Billy wrote.

Thanks for everything!
rmateos
 
Posts: 5
Joined: Thu Feb 10, 2011 4:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: mathematical functions in Eazytrieve

Postby dick scherrer » Mon Oct 10, 2011 10:18 pm

Hello,

Well, there is a very powerful language called REXX - but it has nothing to do with Easytrieve. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post