The acu_initv() function performs all of the initialization needed to run a COBOL program. This includes loading the COBOL configuration file, initializing the user's station, and initializing each available file system.
int ASTDCALL acu_initv(int argc, char **argv);
The acu_initv() function also registers various signal handlers so that the runtime can catch certain signals and perform an orderly shutdown or some other function.
Using acu_abend() with the --no-signal-handlers runtime option allows you to control signal handlers based on the signal type.
For more information on acu_initv(), see Initializing the Runtime.
Note that in some situations, this array of character pointers is needed after acu_initv() returns. Therefore, the variable passed in this parameter must remain in scope until the runtime shuts down. You can accomplish this in one of several ways:
No other arguments are required. To pass additional arguments, format them in the same manner as a typical runcbl command line, where arguments to the runtime are followed by the COBOL program name, and then by any arguments to that COBOL program.
This function returns the argument number of the COBOL program name in argv (or the value of argc if there isn't one), if there is not a failure and the --xreturn argument is not present in argv. The runtime's own main routine uses this to easily locte the name of the program to load. If there is a failure and --xreturn is present in argv, a negative number is returned indicating the source of the failure. Use the following symbols, defined in sub.h, to interpret the failure code.
|AINITV_LICENSE_EXPIRED||License had expired|
|AINITV_LICENSE_NOT_FOUND||License not found|
|AINITV_LICENSE_EXCEEDED||License user count exceeded|
|AINITV_INIT_LIBRARY_FAILED||Library initialization failed|
|AINITV_LOAD_LIBRARY_FAILED||Library load failure|
|AINITV_DEBUG_FAILED||Debug initialization failed|
|AINITV_FILE_FAILED||File manager initialization failed|
|AINITV_MEM_FAILED||Memory allocation failure|
|AINITV_RMT_FILE_FAILED||Remote file manager initialization failed|
|AINITV_STARTUP_FAILED||Runtime initialization failed|
|AINITV_PROFILE_FAILED||Profile initialization failed|
|AINITV_MISMATCHED_VERSIONS||Mismatched version between runtime and support module|