Re: newbie question on cobol syntax



On Mon, 23 Apr 2007 15:34:58 GMT, "William M. Klein"
<wmklein@xxxxxxxxxxxxxxxxx> wrote:

As most people (but not all) agre, "mixing" next sentence with scope delimiters
is NOT a good thing to do.

I've heard of, but haven't come across code that used "next sentence"
to work as "exit paragraph".

paragraph-a.
if my-account = "zzzz"
next sentence
end-if
perform a
perform b
perform c
.
paragraph-b.

I don't care for this myself. CoBOL should be clear and should avoid
"tricks" wherever possible.


Eschew obfuscation.
.



Relevant Pages

  • Re: Para1 THRU Para2
    ... HB>>> The best way to exit a paragraph this way is with an EXIT ... r> putting everything in one sentence makes the nesting too deep. ... One has to look at this logically, and create a transformation ...
    (comp.lang.cobol)
  • Re: COBOL aint quite dead - yet !
    ... sometimes I will replace the EXIT. ... the exactly the same label made into a comment. ... Putting in a paragraph label is a lightweight ... possibility of errors such as goto the wrong one, ...
    (comp.lang.cobol)
  • Re: COBOL aint quite dead - yet !
    ... sometimes I will replace the EXIT. ... was via the last paragraph. ... In Cobol a label may be the target of a goto, a perform, a drop ...
    (comp.lang.cobol)
  • Re: Infinite Loops and Explicit Exits
    ... Massive changes qualify as a 'redesign'. ... A perform of a section or a perform of a paragraph is no matter as both ... Afterwards they would reset the exit point back to what it ... > was a NULop. ...
    (comp.lang.cobol)
  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... The IBM 705 had an instruction pair something ... And once you were used to using such now known as bad practice ... Then what was EXIT intended for? ... >>a paragraph, how is one to reach an EXIT statement save through PERFORM ... ...
    (comp.lang.cobol)