Previous Topic Next topic Print topic


COBCH1686 Ambiguous match for method <method-name> with this signature - will generate dynamic call

The compiler cannot distinguish between multiple call targets.

In the following example, the call from program a cannot determine which target to call: program b or entry point b in program c. In these cases, the call is made dynamically at run-time.

program-id a.
call "b" using 1 2
end program.

program-id b.
linkage section.
 01 n1 binary-long.
 01 n2 binary-long.
procedure division using by value n1 n2.
display n1 space n2
end program b.

program-id c.
linkage section.
 01 n1 binary-long.
 01 n2 binary-long.
procedure division using by value n1 n2.
entry "b" using by value n1 n2
display n1 space n2
end program c.
Previous Topic Next topic Print topic