Subroutines Interview Questions


What is a subroutine?

A subroutine is a code block that is not compiled or executed independently. These subroutines can exist within or outside of the application program.

What are the types of subroutines?

There are two types of subroutines -

  • Internal subroutines.
  • External subroutines
    • Subprograms.
    • PROCEDURE DIVISION copybooks.

What are internal subroutines?

These are paragraphs or sections that are coded within the program and can be called by using the PERFORM statement.

What are external subroutines?

These are the code blocks that can code outside of the program and can be used in multiple programs to complete a task.

What are the types of external subroutines?

These are two types -

  • Subprograms
  • PROCEDURE DIVISION Copybooks

Frequently Asked Questions -

How do you call a subroutine in COBOL?

How do you use a copybook in COBOL?