1)Subroutines
• Program module that can be called by any program.
• You use subroutines to avoid having to write frequently
used program components more than once. Data can be
passed explicitly from and to subroutines.
• Types of subroutine
– internal subroutines
– external subroutines
2)Defining and calling subroutine
Definition - Syntax
FORM .
ENDFORM.
Calling - syntax
a)Internal Subroutines
PERFORM .
b)External Subroutines
PERFORM () [IF FOUND].
IF FOUND - If this is specified and there is no
subroutine in the program ,
the system ignores the PERFORM statement.