A CS_CLIENTMSG (client message) structure contains information about an error or informational message returned by Open ClientConnect. This structure is defined within the application. When the error involves interaction with the operating system, the operating system error information is returned to this structure. ct_diag returns a message string and information about the message into CS_CLIENTMSG.
Server messages are returned to a CS_SERVERMSG structure, described in “CS_SERVERMSG structure”. A sample CS_CLIENTMSG structure is provided in the CTPUBLIC include file.
A CS_CLIENTMSG structure is defined as follows:
typedef struct_cs_clientmsg { CS_INT severity; CS_CHAR msgnumber; CS_INT msgstring[CS_MAX_MSG];
/* **The error may have involved interactions **of the operating system (OS). If so, the **following contains the OS info. */
CS_INT osnumber; CS_CHAR osstring[CS_MAX_MSG; CS_INT osstringlen; CS_INT status; CS_CLIENTMSG;
Severity is a symbolic value representing the severity of the message. Table 2-2 lists the legal values for severity.
Severity value |
Explanation |
---|---|
CS_SV_INFORM (0) |
No error occurred. The message is informational. |
CS_SV_API_FAIL (1) |
A Client-Library routine generated an error. This error is typically caused by a bad parameter or calling sequence. The server connection is probably salvageable. |
CS_SV_RETRY_FAIL (2) |
An operation failed, but it can be retried. |
CS_SV_RESOURCE_FAIL (3) |
A resource error occurred. This error is typically caused by an allocation error, a lack of file descriptors, or timeout error. The server connection is probably not salvageable. |
CS_SV_CONFIG_FAIL (4) |
A configuration error occurred. |
CS_SV_COMM_FAIL (5) |
An unrecoverable error in the server communication channel occurred. The server connection is not salvageable. |
CS_SV_INTERNAL_FAIL (6) |
An internal Client-Library error occurred. |
CS_SV_FATAL (7) |
A serious error occurred. All server connections are unusable. |
msgnumber is the Client-Library message number. Messages are listed in the Mainframe Connect Client Option and Server Option Messages and Codes.
msgstring is the text of the Client-Library message string.
msgstringlen is the length, in bytes, of msgstring. If there is no message text, the value of msgstringlen is 0.
osnumber is the server error number, if any. A value here indicates that the message involved CICS or IMS TM I/O errors, remote server errors, or Transaction Router Service (TRS) errors.
osstring is the text of the operating system message string, if any.
osstringlen is the length, in bytes, of osstring. If there is no message text, the value of osstringlen is 0.
status is reserved for future use.