A 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. CTBDIAG returns a message string and information about the message into CLIENTMSG.
Server messages are returned to a SERVERMSG structure, described in “SERVERMSG structure”. A sample CLIENTMSG structure is provided in the CTPUBLIC copybook.
A CLIENTMSG structure is defined as follows:
DCL 01 CLIENTMSG, 05 CMSG_SEVERITY FIXED BIN(31), 05 CMSG_OC_MSGNO FIXED BIN(31), 05 CMSG_OC_MSGTEXT CHAR(256), 05 CMSG_OC_MSGTEXT_LEN FIXED BIN(31), 05 CMSG_OS_MSGNO FIXED BIN(31), 05 CMSG_OS_MSGTEXT CHAR(256), 05 CMSG_OS_MSGTEXT_LEN FIXED BIN(31), 05 CMSG_STATUS FIXED BIN(31);
CMSG_SEVERITY is a symbolic value representing the severity of the message. Severity values are provided in the CTPUBLIC copybook.
Table 2-2 lists the legal values for CMSG_SEVERITY.
CMSG_SEVERITY value |
Meaning |
---|---|
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 the operation 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. |
CMSG_OC_MSGNO is the Client-Library message number. Client-Library messages are listed in the Mainframe Connect Client Option Installation and Administration Guide.
CMSG_OC_MSGTEXT is the text of the Client-Library message string.
CMSG_OC_MSGTEXT_LEN is the length, in bytes, of CMSG_OC_MSGTEXT. If there is no message text, the value of CMSG_OC_MSGTEXT_LEN is 0.
CMSG_OS_MSGNO 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.
CMSG_OS_MSGTEXT is the text of the operating system message string, if any.
CMSG_OS_MSGTEXT_LEN is the length, in bytes, of CMSG_OS_MSGTEXT. If there is no message text, the value of CMSG_OS_MSGTEXT_LEN is 0.
CMSG_STATUS is reserved for future use.