Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?




On 11-Jul-2005, "Oliver Wong" <owong@xxxxxxxxxxxxxx> wrote:

> I'm trying to write a program that reformats the structure of a given
> COBOL program. One of the transformations I'd like to apply is to try to
> eliminate as many periods as possibles, using the END-whatever (END-IF,
> END-CALL, END-COMPUTE, etc.) constructs.

Why?

Is every statement that can use an END- clause going to have one?

> My question is, is it always possible to do this? I don't want to
> "cheat" by adding new paragraph names at the beginning of every sentence
> (which may affect PERFORM statements anyway). My theory is that yes, it is
> always possible, but I haven't been programming in COBOL for that long, so I
> wasn't sure.

It's not possible to do this when not all of the code is visible. If some of
the code comes from inaccessible copy members or from precompilers, then it
won't work.
.



Relevant Pages