Run time of COBOL program



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Run time of COBOL program

Postby bravedreamer » Fri Jan 15, 2010 8:26 pm

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.
bravedreamer
 
Posts: 14
Joined: Wed Nov 11, 2009 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run time of COBOL program

 

Re: Run time of COBOL program

Postby Robert Sample » Fri Jan 15, 2010 8:37 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Run time of COBOL program

Postby dick scherrer » Sat Jan 16, 2010 1:05 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Run time of COBOL program

Postby bravedreamer » Mon Jan 18, 2010 6:38 pm

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
bravedreamer
 
Posts: 14
Joined: Wed Nov 11, 2009 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run time of COBOL program

Postby dick scherrer » Tue Jan 19, 2010 7:00 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post