SERVERMSG structure

Description

A SERVERMSG (server message) structure contains information about an error or informational message returned by the server. This structure is defined within the application. CTBDIAG returns a message string and information about the message in this structure.

Client messages are returned to a CLIENTMSG structure, described in “CLIENTMSG structure”.

CLIENTMSG and SERVERMSG structures are part of the Mainframe ClientConnect (MCC) CTPUBLIC copybook.

This structure contains information about all messages received by the client application, including MCC messages, messages returned by the remote transactions, and messages returned by the database (such as DB2 Access Module messages and Adaptive Server messages).

Definition

A SERVERMSG structure is defined as follows:

DCL
     01 SERVER-MSG,
         05 SMSG_MSGNO                FIXED BIN(31),
         05 SMSG_STATE                   FIXED BIN(31),
         05 SMSG_SEVERITY            FIXED BIN(31),
         05 SMSG_TEXT                    CHAR(256),
         05 SMSG_TEXT_LEN            FIXED BIN(31),
         05 SMSG_SVRNAME            CHAR(256),
         05 SMSG_SVRNAME_LEN    FIXED BIN(31),
         05 SMSG_PROC                    CHAR(256),
         05 SMSG_PROC_LEN           FIXED BIN(31),
         05 SMSG_LINE                      FIXED BIN(31),
         	05 SMSG_STATUS                  FIXED BIN(31);