Page 1 of 1

Run time of COBOL program

PostPosted: Fri Jan 15, 2010 8:26 pm
by bravedreamer
Hi there!

Short version:
I want to determine the execution time of some dedicated part of my COBOL program. How do I do that?

Long version:
Until half a year ago, I was a 'normal' Java programmer. But now I have changed my habits and also my work place. I'm working now as a mainframe programmer and have to develop my software in COBOL. It's a bit cubercome but its okay. Until now I've only developed some smaller programs that were not designed for performance. But now I've got a bigger project where I have to take care of performance. Out of that issue emerged my problem: I want to compare some different parts of my code (from the viewpoint of the execution time). These do parts perform the same task, but are coded in a different way. So, how do I get an estimate of the execution time? The single built-in function I found was 'CURRENT DATE'. But the precision of this function is in the range of hundredths of second. That's pretty big for my portion of code. Is there another way to determine the execution speed?

thanks for your help.

Re: Run time of COBOL program

PostPosted: Fri Jan 15, 2010 8:37 pm
by Robert Sample
Unless you have a tool such as STROBE (from Compuware) or IBM's Application Performance Analyzer, there is no way to measure execution of parts of a COBOL program. If the performance is acceptable, put it into production and go to the next project. Since modern mainframes execute tens of millions of lines of COBOL per second of CPU time (I have measured this), you would have to have some really, really, really bad code to make any noticeable difference in execution time.

Re: Run time of COBOL program

PostPosted: Sat Jan 16, 2010 1:05 am
by dick scherrer
Hello,

If you run a 100 record test that runs in second or less - do as Robert suggests and move on.

If this same little test takes several minutes or more, then it is time to figure out why as this is surely "some really, really, really bad code".

One cheap way to "measure" how well your code works is to compare the resources used by your code against the resources used by some existing code (that performs acceptably) that does similar work. . .

Re: Run time of COBOL program

PostPosted: Mon Jan 18, 2010 6:38 pm
by bravedreamer
Thanks for your many reponses.

Unfortunately, we don't have these applications mentioned by Robert. Therefore, I will have to watch how my code behaves in the production system.

I just wandered if there is some methodology to perform such tests with COBOL. Since I was before just a normal client/server programmer, I was accustomed to have an eye on the performance.

Anyway, thanks guys

Re: Run time of COBOL program

PostPosted: Tue Jan 19, 2010 7:00 am
by dick scherrer
Hello,

Unfortunately, we don't have these applications mentioned
Many places do not. . .

Still, performance issues are identified and resolved . . .

Before resolving a performance issue, one must be identified.

How does the code in question perform compared to some similar process?