WebSphere MQ C++ message header for the CICS-WebSphere MQ bridge
C++ applications that send messages to the CICS-WebSphere MQ bridge through WebSphere® MQ for z/OS® use the ImqCICSBridgeHeader class to interact with the MQCIH data structure.
The following example shows how to add CICS-WebSphere MQ bridge
header information to a message:
ImqQueueManager mgr ; // The queue manager.
ImqQueue queueIn ; // Incoming message queue.
ImqQueue queueBridge ; // CICS-WebSphere MQ bridge message queue.
ImqMessage msg ; // Incoming and outgoing message.
ImqCicsBridgeHeader header ; // CICS-WebSphere MQ bridge header information.
// Retrieve the message to be forwarded.
queueIn.setConnectionReference( mgr );
queueIn.setName( MY_QUEUE );
queueIn.get( msg );
// Set up the CICS-WebSphere MQ bridge header information.
// The reply-to format is often specified.
// Other attributes can be specified, but all have default values.
header.setReplyToFormat( /* ? */ );
// Insert the CICS-WebSphere MQ bridge header information. This will vary
// the encoding, character set and format of the message.
// Message data is moved along, past the header.
msg.writeItem( header );
// Send the message to the CICS-WebSphere MQ bridge queue.
queueBridge.setConnectionReference( mgr );
queueBridge.setName( /* ? */ );
queueBridge.put( msg );
ImqCICSBridgeHeader class
The ImqCICSBridgeHeader class encapsulates specific features of the MQCIH data structure. Objects of this class are used by applications that send messages to the CICS-WebSphere MQ bridge through WebSphere MQ for z/OS.
Figure 1. ImqCICSBridgeHeader class

The object attributes for this class are as follows:
- ADS descriptor
- Send/receive ADS descriptor. Set the descriptor with MQCADSD_NONE.
The initial value is MQCADSD_NONE. The following additional values
are possible:
- MQCADSD_NONE
- MQCADSD_SEND
- MQCADSD_RECV
- MQCADSD_MSGFORMAT
- attention identifier
- AID key. The field must be of length MQ_ATTENTION_ID_LENGTH.
- authenticator
- RACF® password or PassTicket. The initial value contains blanks, of length MQ_AUTHENTICATOR_LENGTH.
- bridge abend code
- Bridge abend code, of length MQ_ABEND_CODE_LENGTH. The initial value is four blank characters. The value returned in this field depends on the return code.
- bridge cancel code
- Bridge abend transaction code. The field is reserved, must contain blanks, and be of length MQ_CANCEL_CODE_LENGTH.
- bridge completion code
- Completion code, which can contain either the WebSphere MQ completion code or the CICS® EIBRESP value. The field has the initial value of MQCC_OK. The value returned in this field depends on the return code.
- bridge error offset
- Bridge error offset. The initial value is zero. This attribute is read-only.
- bridge reason code
- Reason code. This field can contain either the WebSphere MQ reason or the CICS EIBRESP2 value. The field has the initial value of MQRC_NONE. The value returned in this field depends on the return code.
- bridge return code
- Return code from the bridge. The initial value is MQCRC_OK.
- conversational task
- Whether the task can be conversational. The initial value is MQCCT_NO.
The following additional values are possible:
- MQCCT_YES
- MQCCT_NO
- cursor position
- Cursor position. The initial value is zero.
- facility keep time
- CICS bridge facility release time.
- facility like
- Terminal emulated attribute. The field must be of length MQ_FACILITY_LIKE_LENGTH.
- facility token
- BVT token value. The field must be of length MQ_FACILITY_LENGTH. The initial value is MQCFAC_NONE.
- function
- Function, which can contain either the WebSphere MQ
call name or the CICS EIBFN function. The field has the initial
value of MQCFUNC_NONE, with length MQ_FUNCTION_LENGTH. The value
returned in this field depends on the return code. The following additional values are possible when function contains a WebSphere MQ call name:
- MQCFUNC_MQCONN
- MQCFUNC_MQGET
- MQCFUNC_MQINQ
- MQCFUNC_NONE
- MQCFUNC_MQOPEN
- MQCFUNC_PUT
- MQCFUNC_MQPUT1
- get wait interval
- Wait interval for an MQGET call issued by the bridge task. The
initial value is MQCGWI_DEFAULT. The field applies only when UOW control
has the value MQCUOWC_FIRST. The following additional values are possible:
- MQCGWI_DEFAULT
- MQWI_UNLIMITED
- link type
- Link type. The initial value is MQCLT_PROGRAM. The following
additional values are possible:
- MQCLT_PROGRAM
- MQCLT_TRANSACTION
- next transaction identifier
- ID of the next transaction to attach. The field must be of length MQ_TRANSACTION_ID_LENGTH.
- output data length
- COMMAREA data length. The initial value is MQCODL_AS_INPUT.
- reply-to format
- Format name of the reply message. The initial value is MQFMT_NONE with length MQ_FORMAT_LENGTH.
- start code
- Transaction start code. The field must be of length MQ_START_CODE_LENGTH.
The initial value is MQCSC_NONE. The following additional values
are possible:
- MQCSC_START
- MQCSC_STARTDATA
- MQCSC_TERMINPUT
- MQCSC_NONE
- task end status
- Task end status. The initial value is MQCTES_NOSYNC. The following
additional values are possible:
- MQCTES_COMMIT
- MQCTES_BACKOUT
- MQCTES_ENDTASK
- MQCTES_NOSYNC
- transaction identifier
- ID of the transaction to attach. The initial value must contain blanks, and must be of length MQ_TRANSACTION_ID_LENGTH. The field applies only when UOW control has the value MQCUOWC_FIRST or MQCUOWC_ONLY.
- UOW control
- UOW control. The initial value is MQCUOWC_ONLY. The following
additional values are possible:
- MQCUOWC_FIRST
- MQCUOWC_MIDDLE
- MQCUOWC_LAST
- MQCUOWC_ONLY
- MQCUOWC_COMMIT
- MQCUOWC_BACKOUT
- MQCUOWC_CONTINUE
- version
- The MQCIH version number. The initial value is MQCIH_VERSION_2. The only other supported value is MQCIH_VERSION_1.