Resolving Ambiguous CALL Statements in COBOL85

In COBOL85, the form of the CALL statement that invokes a nested program is identical to the form that implicitly invokes a library. The following is an example of such a statement:

CALL “QROUTINE”.

By default, the system treats this as an invocation of a nested program. If the COBOL85 program does not contain a nested program with the requested name, or the nested program with that name is not declared with the appropriate scope, the system treats the CALL statement as an implicit library invocation. The system links the calling program to a library whose title matches the name specified in the CALL statement.