Module 6: Procedure Division
COBOL- GO BACK
- GOBACK is used to return control back from where it was received.
- GOBACK can be coded as the last statement in both main program as well as sub-program
- Syntax:-
GOBACK.
- Example:-
Main program code snippet:-
PROCEDURE DIVION.
DISPLAY 'HELLO WORLD.'
CALL SUB-PROG.
STOP RUN.
Sub-program “SUB-PROG” code snippet:-
LINKAGE SECTION.
.
.
PROCEDURE DIVION.
DISPLAY ‘SUB-PROGRAM IS CALLED’
GOBACK.
- For complete program, please refer module ‘LINKAGE SECTION’< LINK >
MainframeBug Assistant
a