I am new to COBOL, and I heard that we have two commands for terminating a COBOL program, i.e. "STOP RUN" or "GO BACK"
Can some one be kind enough to explain the difference?
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.