Skip to main content

This article explains that a COBOL entry point cannot be the same as a C API.

Problem:

When writing a COBOL program called main and running it, the 114 runtime error was returned. Why is this?

Resolution:

If you write a COBOL program called main and try running it, you will get the message 114 Attempt to access item beyond bounds of memory (Signal 11).

If you specify the suffix, for example cobrun main.intit will work, however if you just type cobrun main having written nothing, you will also get the error. You cannot have a COBOL entry point the same as a C API. Therefore, main, exit, printf, etc., cannot be used. Otherwise the operating system will get confused and return unexpected results such as a 114 or 115 error.

Old KB# 14483