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 the section “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 (for example, DB2 Access Module messages and Adaptive Server messages).

A SERVERMSG structure is defined as follows:

01 SERVER-MSG
05 SMSG-MSGNO          PIC S9(9) COMP SYNC.
05 SMSG-STATE          PIC S9(9) COMP SYNC.
05 SMSG-SEVERITY       PIC S9(9) COMP SYNC.
05 SMSG-TEXT           PIC X(256).
05 SMSG-TEXT-LEN       PIC S9(9) COMP SYNC.
05 SMSG-SVRNAME        PIC X(256).
05 SMSG-SVRNAME-LEN    PIC S9(9) COMP SYNC.
05 SMSG-PROC           PIC X(256).
05 SMSG-PROC-LEN       PIC S9(9) COMP SYNC.
05 SMSG-LINE           PIC S9(9) COMP SYNC. 
05 SMSG-STATUS         PIC S9(9) COMP SYNC.