Re: Stop Run vs GoBack



In article <4680FA70.6F0F.0085.0@xxxxxxxxxxxxxx>, "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx> wrote:
That, combined with what Roger said, makes sense. The problem I have when I
accidentally use EXIT PROGRAM in a main program is when I have something
like this.

PROCEDURE DIVISION.
PERFORM HOUSEKEEPING
PERFORM MAINLINE
PERFORM CLEANUP
EXIT PROGRAM.
* ^^ should be STOP RUN or GOBACK

Boy, that's stupid. I've *never* done anything *that* dumb.

<cough> <cough>
<shuffles feet & looks around nervously>
<cough> <cough>

At least not while anyone was watching.

[snip]

After it does the expected CLEANUP it then starts over and does
HOUSEKEEPING, MAINLINE and CLEANUP all over again. Not good! :-)

No, it's not -- but it's typically caught pretty early in the testing cycle.
Or so I'm told. Not that I've ever actually done that, you know. ;-)

--
Regards,
Doug Miller (alphageek at milmac dot com)

It's time to throw all their damned tea in the harbor again.
.



Relevant Pages

  • Re: Stop Run vs GoBack
    ... EXIT PROGRAM. ... ^^ should be STOP RUN or GOBACK ... <shuffles feet & looks around nervously> ... MAINLINE and CLEANUP all over again. ...
    (comp.lang.cobol)
  • Re: Stop Run vs GoBack
    ... EXIT PROGRAM. ... ^^ should be STOP RUN or GOBACK ... <shuffles feet & looks around nervously> ... MAINLINE and CLEANUP all over again. ...
    (comp.lang.cobol)
  • Re: Keeping Files Open after program termination in IBM COBOL?
    ... Donald Tees wrote ... > is a mainline in the first place. ... Using an EXIT PROGRAM weon't change whether it thinks that it is a ... execution will continue. ...
    (comp.lang.cobol)