Exception processing, while a good idea in my opinion, is one of those things 
from the 20xx COBOL standards that I have decided to not as IBM to implement.  
The COBOL standard implementation seems to be quite lacking.  There seems no 
way to "wrap" code that might throw an exception inside a block any smaller 
than the program level.  User-defined exceptions are always non-fatal and don't 
even need to be "caught", so it appears to me that an invoking program would 
ignore one by default.  I'd love to be proved wrong.

________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Bill Woodger <[email protected]>
Sent: Sunday, August 14, 2016 3:45 AM
To: [email protected]
Subject: Re: COBOL Unbounded Loops: A Diatribe On Their Omission From the COBOL 
Standard (and a Plea for Understanding)

Keeping it COBOL, there is some masterful documentation relating to the 
probable conceptual origin of try/catch (COBOL's DECLARATIVES) *

However, there are bits of the concept which were left out:

"A declarative procedure can be performed from a nondeclarative procedure.

A nondeclarative procedure can be performed from a declarative procedure.

A declarative procedure can be referenced in a GO TO statement in a declarative 
procedure.

A nondeclarative procedure can be referenced in a GO TO statement in a 
declarative procedure.

You can include a statement that executes a previously called USE procedure 
that is still in control. However, to avoid an infinite loop, you must be sure 
there is an eventual exit at the bottom.

The declarative procedure is exited when the last statement in the procedure is 
executed."




* this statement may include an assumption with which others disagree

----------------------------------------------------------------------
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