What happens when STOP RUN given in subprogram

This is a good question for COBOL developers. The simple answer is your program execution will be stopped.

Sub program cannot send control back to main module. So your execution will be stopped when you give STOP RUN.

Whereas the GOBACK and EXIT-PROGRAM can pass control to called module.

GOBACK has dual capability it can be given in both main and sub modules.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.