+-------------------------------IBM Extension--------------------------------+
The GOBACK statement functions like the EXIT PROGRAM statement when it is coded as part of a program that is a subprogram in a COBOL run unit, and like the STOP RUN statement when coded in a program that is a main program in a COBOL run unit.
The GOBACK statement specifies the logical end of a called program.
GOBACK Statement - Format >>-GOBACK------------------------------------------------------><
A GOBACK statement should appear as the only statement, or as the last of a series of imperative statements, in a sentence because statements following the GOBACK statement are not executed.
If control reaches a GOBACK statement while a CALL statement is active, control returns to the point in the calling program immediately following the CALL statement, as in the EXIT PROGRAM statement.
The RETURN-CODE special register can be used to pass return code information before executing a GOBACK statement. See RETURN-CODE Special Register.
For further information about COBOL run units, see the chapter on Calling and Sharing Data Between ILE COBOL Programs in the ILE COBOL for AS/400 Programmer's Guide.
+----------------------------End of IBM Extension----------------------------+
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.