ImqIMSBridgeHeader C++ class

This class encapsulates features of the MQIIH data structure.

Figure 1. ImqIMSBridgeHeader class
A Booch class diagram showing the ImqIMSBridgeHeader class and its parent class, ImqHeader.

Objects of this class are used by applications that send messages to the IMS bridge through IBM® MQ for z/OS®.

Note: The ImqHeader character set and encoding must have default values and must not be set to any other values.

Object attributes

authenticator
RACF® password or passticket, of length MQ_AUTHENTICATOR_LENGTH. The initial value is MQIAUT_NONE.
commit mode
Commit mode. See the OTMA User's Guide for more information about IMS commit modes. The initial value is MQICM_COMMIT_THEN_SEND. The additional value, MQICM_SEND_THEN_COMMIT, is possible.
logical terminal override
Logical terminal override, of length MQ_LTERM_OVERRIDE_LENGTH. The initial value is a null string.
message format services map name
MFS map name, of length MQ_MFS_MAP_NAME_LENGTH. The initial value is a null string.
reply-to format
Format of any reply, of length MQ_FORMAT_LENGTH. The initial value is MQFMT_NONE.
security scope
Scope of IMS security processing. The initial value is MQISS_CHECK. The additional value, MQISS_FULL, is possible.
transaction instance id
Transaction instance identity, a binary (MQBYTE16) value of length MQ_TRAN_INSTANCE_ID_LENGTH. The initial value is MQITII_NONE.
transaction state
State of the IMS conversation. The initial value is MQITS_NOT_IN_CONVERSATION. The additional value, MQITS_IN_CONVERSATION, is possible.

Constructors

ImqIMSBridgeHeader( );
The default constructor.
ImqIMSBridgeHeader( const ImqIMSBridgeHeader & header );
The copy constructor.

Overloaded ImqItem methods

virtual ImqBoolean copyOut ( ImqMessage & msg );
Inserts an MQIIH data structure into the message buffer at the beginning, moving existing message data further along. Sets the msg format to MQFMT_IMS.

See the parent class method description for further details.

virtual ImqBoolean pasteIn ( ImqMessage & msg );
Reads an MQIIH data structure from the message buffer.

To be successful, the encoding of the msg object must be MQENC_NATIVE. Retrieve messages with MQGMO_CONVERT to MQENC_NATIVE.

To be successful, the ImqMessage format must be MQFMT_IMS.

See the parent class method description for further details.

Object methods (public)

void operator = ( const ImqIMSBridgeHeader & header );
Copies instance data from header, replacing the existing instance data.
ImqString authenticator ( ) const ;
Returns a copy of the authenticator, padded with trailing blanks to length MQ_AUTHENTICATOR_LENGTH.
void setAuthenticator ( const char * name );
Sets the authenticator.
MQCHAR commitMode ( ) const ;
Returns the commit mode.
void setCommitMode ( const MQCHAR mode );
Sets the commit mode.
ImqString logicalTerminalOverride ( ) const ;
Returns a copy of the logical terminal override.
void setLogicalTerminalOverride ( const char * override );
Sets the logical terminal override.
ImqString messageFormatServicesMapName ( ) const ;
Returns a copy of the message format services map name.
void setMessageFormatServicesMapName ( const char * name );
Sets the message format services map name.
ImqString replyToFormat ( ) const ;
Returns a copy of the reply-to format, padded with trailing blanks to length MQ_FORMAT_LENGTH.
void setReplyToFormat ( const char * format );
Sets the reply-to format, padded with trailing blanks to length MQ_FORMAT_LENGTH.
MQCHAR securityScope ( ) const ;
Returns the security scope.
void setSecurityScope ( const MQCHAR scope );
Sets the security scope.
ImqBinary transactionInstanceId ( ) const ;
Returns a copy of the transaction instance id.
ImqBoolean setTransactionInstanceId ( const ImqBinary & id );
Sets the transaction instance id. The data length of token must be either zero or MQ_TRAN_INSTANCE_ID_LENGTH. This method returns TRUE if successful.
void setTransactionInstanceId ( const MQBYTE16 id = 0 );
Sets the transaction instance id. id can be zero, which is the same as specifying MQITII_NONE. If id is nonzero, it must address MQ_TRAN_INSTANCE_ID_LENGTH bytes of binary data. When using predefined values such as MQITII_NONE, you might need to make a cast to ensure a signature match, for example (MQBYTE *)MQITII_NONE.
MQCHAR transactionState ( ) const ;
Returns the transaction state.
void setTransactionState ( const MQCHAR state );
Sets the transaction state.

Object data (protected)

MQIIH omqiih
The MQIIH data structure.

Reason codes

  • MQRC_BINARY_DATA_LENGTH_ERROR
  • MQRC_INCONSISTENT_FORMAT
  • MQRC_ENCODING_ERROR
  • MQRC_STRUC_ID_ERROR