COBOL Goback

COBOL Exit Program COBOL Initialize

Advertisements


GOBACK gives the control back from where it received it.

GOBACK statement is the logical end of the called program or invoked method.

GOBACK also responsible for returning the control to the calling program.

GOBACK can be coded in both main program and sub program.

If GOBACK coded in the Main program, returns the control to the system.

If GOBACK coded in the sub program, returns the control to the calling program.

GOBACK passed control to the statement which is immediately next to the active CALL statement in the main program.

If no active CALL statement is active, GOBACK passes the control to exit through next executable statement like EXIT PROGRAM.

Syntax:
	GOBACK

GOBACK is a PROCEDURE DIVISION statement which should be always in AREA B.

Practicle Example


If any questions on the above, post your queries on Cobol Discussion forum


COBOL Exit Program COBOL Initialize

Advertisements