IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Remove unnecessary displays in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 51
Location: India

PostPosted: Mon Jun 29, 2015 1:41 pm
Reply with quote

In my some of production cobol programs i can see that there are lot of unnecessary displays (around 15k-20k lines in spool)

I wanted to know will removing theses display will result in any cost saving or not ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Jun 29, 2015 4:15 pm
Reply with quote

It will certainly result in savings; whether those savings will be significant is not something we can answer, as we do not know your environment. The gripping hand is that it should be done regardless.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jun 29, 2015 9:00 pm
Reply with quote

One way to find out what it will "cost" is to make a program of nothing but those DISPLAYs and any working storage to support any displayed variable, compile and run it.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 29, 2015 11:15 pm
Reply with quote

Quote:
I wanted to know will removing theses display will result in any cost saving or not ?
First, you need to find out if cost savings are even possible. Some sites charge back mainframe costs and some sites don't. If your site does not charge back mainframe costs, then there is no chance for cost savings.

If you are using the term "cost savings" in a generic sense, rather than specifically oriented to currency savings, you need to consider that a current z/Architecture machine will execute tens of millions to hundreds of millions of lines of COBOL per second of CPU time. If we assume 100 million lines of COBOL per second of CPU time, and we assume the program uses one second of CPU time (most use more), and we assume that your DISPLAY statements take an average amount of CPU time per statement, saving 20,000 lines of DISPLAY statements in your program will reduce the CPU usage (and hence cost) a grand total of 0.02% (2 ten-thousandths). Even assuming the DISPLAY statements use 5 times as much CPU time as the typical COBOL statement, you are still looking at a "cost savings" of one-tenth of one percent by removing all DISPLAY statements. And, if your program runs a total of 10 seconds of CPU time, the cost savings will go down by a factor of 10. Depending upon how you play with the assumptions, you can come up with a "cost savings" in the range of 2% to 0.002% of the total program cost -- and unless the charge back scheme is really unusual (or there are other reasons to pursue it), there's not going to be much reason to expect cost savings by removing the DISPLAY statements.

Cost savings, like performance improvement, for COBOL programs should be a function of need -- if AND ONLY IF there is a known issue should anyone look at how to improve performance / reduce cost.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top