Re: Stop Run vs GoBack
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Tue, 26 Jun 2007 04:56:21 -0400
"Roger While" <simrw@xxxxxxxxxxxx> wrote in message
news:f5q485$ngp$03$1@xxxxxxxxxxxxxxxxxxxx
[snip]
Of course, ABSENCE of L/S does not imply anything about ais
program either.
In fact, I have 2 ported apps that each contain a prog (without L/S) that
both run as a free-standing (main) program and as a callable
module.
Original machine environment for these app's is unknown
except it was "big iron".
Interestingly enough, both of these progs have a single exit
point which is an EXIT PROGRAM as the last statement in
the source. (That, at least, is the state in which I received them;
I can not say if they have been modified from the real original)
Beginning with COBOL 85, if control passes through
the last statement in a program, the runtime behavior
is an implicit EXIT PROGRAM statement followed
by an implicit STOP RUN statement. With 2002, an
implicit GOBACK statement is executed.
FDIS ISO/IEC 1989:2002, page 388, 14.5.3 Explicit
and implicit transfers of control,
"There is also no next executable statement after the last
statement in a source element when the paragraph in
which it appears is not being executed under the control
of some other COBOL statement in that source element,
after the end marker, and if there are no procedure
division statements in a program, function, or method. In
these cases, an implicit GOBACK statement without any
optional phrases is executed."
.
- Follow-Ups:
- Re: Stop Run vs GoBack
- From: Frank Swarbrick
- Re: Stop Run vs GoBack
- From: Roger While
- Re: Stop Run vs GoBack
- References:
- Stop Run vs GoBack
- From: William M. Klein
- Re: Stop Run vs GoBack
- From: Howard Brazee
- Re: Stop Run vs GoBack
- From: Frank Swarbrick
- Re: Stop Run vs GoBack
- From: Roger While
- Stop Run vs GoBack
- Prev by Date: Help: Anyone have a demo about "Hello World" on windows OS with Micro Focus COBOL
- Next by Date: Re: Stop Run vs GoBack
- Previous by thread: Re: Stop Run vs GoBack
- Next by thread: Re: Stop Run vs GoBack
- Index(es):