View previous topic :: View next topic
|
Author |
Message |
M.Bhavani Prasad
New User
Joined: 10 Mar 2006 Posts: 6 Location: Hyderabad
|
|
|
|
Difference between STOP RUN and GOBACK in COBOL |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi
Quote: |
Difference between STOP RUN and GOBACK |
This topic already discussed so many times in forum, Please make search .
Regards
Rupesh |
|
Back to top |
|
|
mfjude
New User
Joined: 09 Jan 2006 Posts: 20
|
|
|
|
to my knowledge "stop run" returns control to the runtime environ. while 'goback' returns control to the calling pgm... |
|
Back to top |
|
|
KS
New User
Joined: 28 Feb 2006 Posts: 91 Location: Chennai
|
|
|
|
Hi,
STOP RUN terminates the run unit,and deletes all dynamically called
programs in the run unit and all programs link-edited with them. (It
does not delete the main program.)STOP RUN statement does not have to be the last statement in a sequence, but the statements following the STOP RUN will not be executed.STOP RUN statement closes all files defined in any of the programs
GOBACK statement specifies the logical end of a called program or invoked method.Should appear as the only statement or as the last of a
series of imperative statements in a sentence because any statements following theGOBACK are not executed.
Thanks,
KS |
|
Back to top |
|
|
ASHISH GOTTLIEB
New User
Joined: 08 Apr 2006 Posts: 1 Location: PUNE
|
|
|
|
IN COBOL PROGRAMMING IF YOU PUT STOP RUN AFTER ANY SENTENCE THEN THE CONTROL COMES OUT OF PROGRAM AND IN CASE OF GO TO CONTROL WILL PASS TO THE STATEMENT SPECIFIED IN THE GO TO STATEMENT
STOP RUN can only be used in the main program. When executed, it returns back to OS.
GOBACK can be used both in the main program and in a sub program.
GOBACK returns controls either back to the main program or to the OS.
Any statement following the GOBACK execution results in the subsequent statements not being executed.
Statements following STOP RUN are also not executed.
GOBACK in the sub program functions as an exit program. |
|
Back to top |
|
|
|