For Programmers: Free Programming Magazines  


Home > Archive > Cobol > July 2005 > Re: Is it always possible to write a COBOL program using only 1 sentence per paragrap









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Is it always possible to write a COBOL program using only 1 sentence per paragrap
Clark Morris

2005-07-24, 8:17 pm

On Tue, 19 Jul 2005 11:02:50 +1200, "Pete Dashwood"
<dashwood@enternet.co.nz> wrote:

>
>"Howard Brazee" <howard@brazee.net> wrote in message
>news:dbge55$gm2$1@peabody.colorado.edu...
>
>I'd be interested to know what those environments were, Howard. Never
>encountered it myself, and am having great difficulty imagining it.
>
>
>
>A very fair question. If no human is going to maintain it, you could well
>argue that duplication is irrelevant. However, it isn't . Here are some
>reasons why even a code generator might avoid duplicated code:
>
>1. Isolation and reuse of functionality. Refactoring code into component
>functions means that the code can be shared and reused. Even if you are not
>maintaining it, you might want to export the functionality to other systems
>or include it in new features of existing systems. (This is the main
>advantage of component based systems.)
>
>2. The less code that is generated, the faster it will run.


Not necessarily. Some of the wild optimizations of IBM's mainframe
COBOL include moving the code for PERFORMed paragraphs inline
replacing the PERFORM depending on how many places the paragraph is
PERFORMED from. I am certain that the same exists in other compilers
for various languages.
>3. It is easier to maintain an inventory of discrete functions if their
>functionality is not duplicated all over the place.


This is true. This gets into a whole host of questions on tradeoffs
on maintainability, control of introduction of new functions, the
efficiencies of compile time versus bind time versus run-time binding,
especially with parameter checking. NOTE CLEARLY, this is not an OO
versus non_OO question since run-time binding is being done in a large
percentage of z/OS COBOL shops today (all CALLs use the DYNAM option).[color=darkred]
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com