The acu_runmain() function can be used to start up a COBOL program which is treated like the main program of the run unit.


void ASTDCALL acu_runmain(int argc, char **argv, int pgm_arg);


argc and argv are main-style arguments. Typically, they are the same as the values passed to acu_initv().

program_arg is the argument number (in argv) of the name of the COBOL program.


For an example of using acu_runmain(), see Starting a COBOL main program.

Return Values

When the COBOL program stops, the acu_runmain() function halts but does not return.