RETURN – Exit the subroutine

Use the RETURN command to exit the subroutine and return the processing to the instruction that follows the CALL command.


1  RETURN

When multiple subroutines are defined, a RETURN statement is automatically assumed when the next SUBROUTINE statement is encountered. When the last statement in SYSIN is reached, a RETURN is assumed if a subroutine is being defined at that point.

A RETURN statement encountered outside a subroutine is treated like an EXIT statement.