COBES0004 Nested or multi-source programs not allowed.

You are trying to compile a program that is nested or multi-source. This is not supported.

Resolution:

Move the subroutines to a separate program.