SUBROUTINE – Indicate the start of a subroutine

Use the SUBROUTINE statement to indicate the start of a new subroutine, which can be run by the CALL SUB command.

LABEL: SUBROUTINE

A label must precede a SUBROUTINE statement.

Subroutines must be coded at the end of the SYSIN. The SUBROUTINE statements themselves cannot be contained within an INCLUDE statement, but subroutines can contain INCLUDE statements.

If an EXIT statement is not coded at the end of the main program, the first SUBROUTINE statement will indicate an implicit EXIT.