Can “STOP RUN” be Given in COBOL Subroutines

The statement “STOP RUN” be given usually in calling modules. When the “STOP RUN” statement encounters, this tells COBOL run-time unit to stop execution of COBOL program.

Why Can’t STOP RUN to be Given in Subroutine

  • This is the reason, it cannot be given in subroutines. The point is, the same question asked in many interviews that, what happens if be given in subroutines.
  • The answer is, COBOL run time unit gets stopped unexpectedly and the calling module issues an abend/exception.
  • But, the non standard GOBACK statement can be given in both calling/called modules.

Related Posts

Author: Srini

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