Re: EXIT PARAGRAPH on z/OS was Re: Bad habits of GOTO-using programmers



On Wed, 12 Nov 2008 16:59:42 -0400, Clark F Morris <cfmpublic@xxxxxxxxxxxxxxx> wrote:

On Tue, 11 Nov 2008 22:56:42 -0500, Robert <no@xxxxxx> wrote:

On Tue, 11 Nov 2008 12:50:24 -0700, Howard Brazee <howard@xxxxxxxxxx> wrote:

On Tue, 11 Nov 2008 09:20:19 -0800 (PST), Richard
<riplin@xxxxxxxxxxxx> wrote:

I'd be satisfied with an up-to-date compiler allowing me to
EXIT-PERFORM.    

EXIT PERFORM is only allowed within in-line PERFORMs. It won't jump
out of a PERFORMed paragraph.

So those who are in favor of exit paragraphs still have a valid
argument. In maintenance we don't want to redesign the flow, and
switches are, IMHO worse than GO TO EXIT.

Well written code doesn't need switches nor go to. If you think you need a switch, there's
something wrong with your structure.

All languages need ways of exiting loops. CoBOL programs need to be
able to exit performed paragraphs. Right now, the options are clumsy
and subject to error. Simplicity is the key here.

EXIT PARAGRAPH is simple. Falling to the end is even simpler.

I doubt COBOL for z/OS has yet been upgraded to have anything that
modern or useful.

The reason is lack of demand. It would be of no use to customers who write
PERFORM A1200-RD-SBMSTR THRU A1200-RD-SBMSTR-EXIT.
.