COBOL Stop run

COBOL Display Statement COBOL Exit Program

Advertisements


STOP RUN is the last executable statement in the program which will returns the control back to OS.

STOP RUN always coded in the main program.

If STOP RUN coded in the sub program, the control will return to OS instead of returning to main program. In this case, the remaining task coded in main program will be incomplete.

STOP RUN closes all opened files in the program.

When the STOP RUN executed, immediately all running tasks by the program will be closed and control transfers to OS.

Syntax:
	STOP RUN

STOP RUN always terminates the current program execution regardless of the program type (main program or sub program).

Practical Example:


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


COBOL Display Statement COBOL Exit Program

Advertisements