Calling the Runtime From a C Main Program

ACUCOBOL-GT uses a runtime system to execute its compiled COBOL programs. This runtime system is a fully linked executable program and, as such, contains its own main routine. The runtime assumes that the first program to run will be a COBOL program.

If, however, you have a "server" program in an OLTP environment that waits for requests from clients and then calls COBOL to handle those requests, you can choose to replace the runtime's own main routine with another.

Note:

You do not need to start a COBOL main program to call COBOL subroutines. If you use a C main program, note that certain COBOL verbs can prevent you from returning from a called COBOL subroutine to your C main program.