── RETURN ─────────────────────────────────────────────────┤
Explanation
The RETURN statement makes an early return from a subroutine or makes an early return from the invocation of an ON condition. If a RETURN statement is executed in a subroutine that was called synchronously, execution passes to the statement following the subroutine invocation statement. If a RETURN statement is executed in an asynchronous subroutine, the subroutine terminates normally.
Example
The following is an example job that uses the RETURN statement:
SUBROUTINE COMPSUB; BEGIN TASK T; COMPILE OBJECT/X WITH COBOL74 [T] LIBRARY; COMPILER FILE CARD(KIND=DISK,TITLE=X); IF T ISNT COMPILEDOK THEN RETURN; RUN OBJECT/X; END COMPSUB;