With the elimination of procedure division sections and PERFORM THRU, and 
without the use of GO TO, there should be no reason to insert such a label.  
The new EXIT statements allow us to do all (?) of this without the need for 
doing those "more dangerous" (in my opinion) things.


ALTER is bad because its not obvious when you look at a piece of code where it 
might actually branch to.


Depending on the program complexity I have every intention of removing the use 
of procedure division sections and perform through.


Anyway, would you agree that because they are there it probably makes sense to 
come up with some best practices for their use, rather than simply recommending 
they not be used?  That was my intent in my original post to the Cobol Cafe, 
but you derailed that a bit my rallying against it.  :-)


Frank

________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Bill Woodger <[email protected]>
Sent: Wednesday, July 13, 2016 4:14 AM
To: [email protected]
Subject: Considering Enterprise COBOL 5.2 "exit" enhancements

Please list from all those languages in which of them the logic flow changes by 
adding a label.

There is nothing intrinsic with ALTER ... TO PROCEED TO ... or GO TO ... 
DEPENDING ON ... or GO TO itself which makes it "bad", it is the way that they 
were (ab)used.

"My program is 'Structured' because I replaced all the GO TOs with a 
'Structured' construct'. Well, no.

It is my expectation that the new EXIT options will be roundly (ab)used. Future 
history will tell.

Since I have no normal need for GO TO, I have no normal need for these 
constructs. This biases me against them.

Superficially, anything which enhances the idea to use single paragraphs (or 
SECTIONs with no paragraphs) for PERFORM is good. No dumb "exit paragraphs" 
means no target for a GO TO. However, if then secret GO TOs can instead be 
used, some of the point is lost.

Practically, no program is going to be changed to replace PERFORM ... THRU ... 
or PERFORM of a SECTION containing (referenced) paragraphs just because EXIT 
PARAGRPAH exists. Yet EXIT PARAGRAPH and EXIT SECTION are there, and quite 
posibly will be used in those situations. After all, they are "Structured" so 
"good" and better than a GO TO, so the thinking will go.

Is the behaviour clear? I suppose ask people. In my example in the first post, 
I suspect that people will assume the "exit paragraph" 'exits' the PERFORM.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to