AllExperts > Experts 
Search      
Cobol
Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Cobol Answers
Question Library

Ask a question about Cobol
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About David Nelson
Expertise
I specialize in IBM z/OS COBOL and MicroFocus OCDS and Server Express non-OOP. Design, coding and performance oriented questions. Also linking to IBM Assembler from COBOL. Because the rules change with version, please state language level, version and platform environment. See CICS for questions about CICS.

Experience

Past/Present clients
Major Financial Institutions, State of NC (DHHS), Manufacturing, Financial services, Warehousing, Software developer and others.

 
   

You are here:  Experts > Computing/Technology > Cobol > Cobol > MVS COBOL: DISPLAY STATEMENT PERFORMANCE

Topic: Cobol



Expert: David Nelson
Date: 9/15/2008
Subject: MVS COBOL: DISPLAY STATEMENT PERFORMANCE

Question
I'm analyzing an MVS JCL running some Cobol programs.
This JCL has avarage an elapsed time of 02.44.38 against a CPU time of 00.35.23, with 2725527 Service Units and a Sysout Print Lines of 400,000 (!!!).
The main Cobol programs infact use a lot of DISPLAYs and most of fields displayed are COMP.
My question is (before deciding to write a report file instead of DISPLAYing such a huge numbers of lines):
what the impact could be on the elapsed time if I reduce numbers of DISPALYs (for istance DISPLAYing more fields in one single DISPLAY instead of one DISPLAY by field) and if the fact of DISPLAYing lot of COMP field impact the elapsed time?

tks a lot. Daniele Piras

Answer
If I understand you are saying 35 min 23 sec CPU in 2 hr, 44 min, 38 Secs elapsed!
While this may be affected by the 400,000 lines of sysout display, how is the output blocked?  By itself display is fairly efficient, but if the block is very low (BLKSIZE=121,LRECL=121 or close that will slow it down. If you have many separate DISPLAYs for a single input record then definitely combining will help. Display will auto wrap lines at 120 bytes of data, but I suggest keeping display to a non-report data output.

However, you can tell very quickly by looking at the excp count for the various files and what other functions are being used. A quick test would be to '*' the DISPLAY lines and re-run, if a big change then DISPLAY is a problem.  If not, then other processing and I/O is the problem. Also, what is the general CPU %busy load.  If it is very high (97+%) then your app could just be a victim of no cpu cycles.  Your service unit figure is not out of line for 35 min CPU time.  If your WAIT time is very large that would account for the long time also.

Your total job time is not out of line for the CPU vs Elapsed.

If you have further questions after you try above, give me some more stats.
David

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.