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:
01 CLIENTMSG. 05 CMSG-SEVERITY PIC S9(9) COMP SYNC. 05 CMSG-OC-MSGNO PIC S9(9) COMP SYNC. 05 CMSG-OC-MSGTEXT PIC X(256). 05 CMSG-OC-MSGTEXT-LEN PIC S9(9) COMP SYNC. 05 CMSG-OS-MSGNO PIC S9(9) COMP SYNC. 05 CMSG-OS-MSGTEXT PIC X(256). 05 CMSG-OS-MSGTEXT-LEN PIC S9(9) COMP SYNC. 05 CMSG-STATUS PIC S9(9) COMP SYNC.
CMSG-SEVERITY is a symbolic value representing the severity of the message. Severity values are provided in the CTPUBLIC copybook.
Table 3-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 and Server Option Messages and Codes.
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.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |