Our use of GO TO is generally restricted to usage such as:

   PERFORM I-P THRU I-P-EXIT UNTIL CONDITION.

I-P.
    READ FILE AT END
         SET CONDITION TO TRUE
         GO TO I-P-EXIT
    END-READ
...
I-P-EXIT.
    EXIT.

Otherwise, to avoid the GO TO, we'd need to do:

I-P.
    READ FILE AT END
         SET CONDITION TO TRUE
    END-READ
    IF NOT CONDITION THEN
...
    END-IF.
I-P-EXIT.
    EXIT.

Which I consider to be worse than the exit, so far as comprehension is 
concerned.

-- 
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets®

9151 Boulevard 26 . N. Richland Hills . TX 76010
(817) 255-3225 phone . 
[email protected] . www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets® is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA 
Life and Health Insurance Company.SM

 

> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Thomas Berg
> Sent: Monday, April 16, 2012 5:40 AM
> To: [email protected]
> Subject: SV: GO TO "cobol"
> 
> An alternative is to have e g an 88-type LEAVE item that is 
> checked for every code-block including all iterations and selections. 
> (You set leave to true when wanting to do a "leave" type jump.)
> 
> 
> 
> Regards,
> Thomas Berg
> ______________________________________________________
> Thomas Berg   Specialist   AM/DQS   SWEDBANK AB (publ)
> 
> 
> 
> > -----Ursprungligt meddelande-----
> > Från: IBM Mainframe Discussion List 
> [mailto:[email protected]] För
> > Edward Jaffe
> > Skickat: den 16 april 2012 08:15
> > Till: [email protected]
> > Ämne: Re: GO TO "cobol"
> > 
> > On 4/15/2012 10:31 PM, Wayne Bickerdike wrote:
> > > For devotees of Jackson Structured programming, the GOTO 
> is a must for
> > > POSIT and ADMIT processing. Otherwise it can be messy 
> avoiding a GOTO.
> > 
> > The problem with GOTO is that the suitability of the target branch
> > location is
> > not enforced by the compiler according to any structured discipline.
> > 
> > Premature terminations (posit/quit/admit) can almost always 
> be handled
> > with
> > LEAVE-type statements or immediate return from a subroutine. Some
> > languages have
> > SIGNAL, EXIT, etc. which can help provide structured premature
> > termination for
> > larger routines without resorting to the dreaded GOTO.
> > 
> > --
> > Edward E Jaffe
> > Phoenix Software International, Inc
> > 831 Parkview Drive North
> > El Segundo, CA 90245
> > 310-338-0400 x318
> > [email protected]
> > http://www.phoenixsoftware.com/
> > 
> > 
> ----------------------------------------------------------------------
> > 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
> 
> 

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

Reply via email to