Call returns the following error codes to the .NET environment. The .NET programmer can refer to the error code, an enumerator, to get more information.
When ShowError is "true", Call displays the message text. The property, LastErrorMsg, is also available to retrieve the last error text string. When "wrunnet.dll" is referenced in a Visual Studio .NET project or the compiled COBOL program used the "--netdll" option, error codes can be viewed using the object browser of Visual Studio .NET. When the "--netdll" option is used, errorTypes is inluded in the "ProgramName_CVM.dll".
public enum errorTypes : int { /* runtime is not thread-safe */ CS_MULTIPLE_OS_THREADS = -4, CS_WIN_INIT_FAILED = -3, CS_STOP_RUN = -2, CS_CONT = -1, CS_OK = 0, /* program executed with no errors */ CS_MISSING = 1, /* Program missing or inaccessible */ CS_NOT_COBOL = 2, /* Not a COBOL program */ CS_INTERNAL = 3, /* Corrupted program */ CS_MEMORY = 4, /* Inadequate memory available */ CS_VERSION = 5, /* Unsupported version of object code */ CS_RECURSIVE = 6, /* Program already in use */ CS_EXTERNAL = 7, /* Too many external segments */ CS_LARGE_MODEL = 8, /* Large-model program not supported */ CS_JAPANESE = 14, /* Japanese extensions not supported */ CS_MULTITHREADED = 22, /* Multithreaded CALL RUN illegal */ CS_AUTHORIZATION = 23, /* Access denied */ CS_CONNECT_REFUSED = 25, //Connection refused //Program contains object code for a different processor CS_MISMATCHED_CPU = 27, CS_SERIAL_NUMBER = 28 /* Incorrect serial number */ //user count exceeded on remote server CS_USER_COUNT_EXCEEDED = 29, CS_LICENSE = 30, /* License error */ CS_UNSUPPORTED_PARAM = 31, /* unsupported parameter */ CS_COBOL_SIGNAL = 65, CS_COBOL_FATAL_ERROR = 66 };