MQI Function Descriptions

The MQ Adapter supports the MQI call interface to invoke MQ functions from online CA IDMS programs. 
idms19
The MQ Adapter supports the MQI call interface to invoke MQ functions from online CA IDMS programs. This article describes the following MQ functions that are defined by IBM:
  • MQBACK
  • MQCLOSE
  • MQCMIT
  • MQCONN
  • MQDISC
  • MQGET
  • MQINQ 
  • MQOPEN
  • MQPUT
  • MQPUT1
  • MQSET
  • MQSTAT
MQBACK
MQBACK tells the queue manager to back out all gets and puts since the last sync point.
MQBACK(
ConnectionHandle, CompCode, RsnCode)
Usage Notes
 
  • When a DC task ends abnormally with uncommitted changes, task termination processing issues an MQBACK. 
  • If the current MQ session was created by MQOPEN and has no open objects, the utility subtask that is reserved for this session is released.
MQCLOSE
MQCLOSE terminates access to a queue.
MQCLOSE(
ConnectionHandle, ObjectHandle, Options, CompCode, RsnCode)
Usage Notes
 
  • An implicit MQCLOSE is issued for any open objects when a task ends.
  • If the current MQ session was created by MQOPEN and has no uncommitted changes, the utility subtask that is reserved for this session is released.
MQCMIT
MQCMIT creates a sync point for the queue manager, making all previous puts and gets permanent.
MQCMIT(
ConnectionHandle, CompCode, RsnCode)
Usage Notes
 
  • When a DC task ends normally with uncommitted changes, task termination processing issues an MQCMIT. 
  • If the current MQ session was created by MQOPEN and has no open objects, the utility subtask that is reserved for this session is released.
MQCONN
MQCONN establishes an IDMS MQ session. IDMS may connect to the queue manager or may use an existing connection.
MQCONN(
QManagerName
,
ConnectionHandle, CompCode, RsnCode)
Usage Notes:
 
  • This call is not required. IDMS MQ sessions are automatically created on the first MQOPEN if one does not exist. 
  • Sessions created by MQCONN will persist until the task ends or MQDISC is issued.
  • A utility subtask is reserved for this session
  • The parameter, QManagerName is ignored.
MQDISC
MQDISC terminates an IDMS MQ session.  IDMS remain connected to the queue manager unless the IDMS MQ interface is disabled.
MQDISC(
ConnectionHandle, CompCode, RsnCode)
Usage Notes
 
  • This call is not required. IDMS MQ sessions end when a task ends.
  • This call may be issued to end a session, regardless of how the session was started.
  • If this call is issued, the following actions occur for the session:
    • Uncommitted changes are committed.
    • Open objects are closed.
    • The utility subtask that is reserved for this session is released.
MQGET
MQGET obtains a message from a queue.
MQGET(ConnectionHandle,
ObjectHandle
, MessageDescriptor,
MQGMOStructure, BufferLength, Buffer, DataLength, CompCode, RsnCode)
Usage Notes
 
  • The MQGMO_SET_SIGNAL option is not supported in ADS.
  • Unless MQGMO_NO_SYNCPOINT is specified, IDMS considers the MQ session to have uncommitted changes.
  • When the MQGMO_WAIT option is used, the defined INACTIVE INTERVAL for the IDMS task may need to be increased.
  • If the IDMS MQ connection is disabled while an MQ session is open, when the MQGMO_FAIL_IF_QUIESCING option is used, the call fails with reason code MQRC_Q_MGR_QUIESCING. 
MQINQ
MQINQ inquires object attributes.
MQINQ(ConnectionHandle,
ObjectHandle
, SelectorCount, Selectors, IntegerAttrCount, IntegerAttrs, CharAttrLength, CharAttrs, CompCode, RsnCode)
Usage Note
 
  • No IDMS requirements
MQOPEN
MQOPEN initializes access to a queue.
MQOPEN(ConnectionHandle, ObjectDescription, Options, Object
Handle
, CompCode, RsnCode)
Usage Notes
 
  • If there is no active session, the first MQOPEN opens a session.  The session reserves a subtask. Following MQ calls use this subtask until the session ends.
  • If the utility subtask has not connected to the queue manager, it is connected before the call is processed.
  • When the MQOO_FAIL_IF_QUIESCING option is used, if the CA IDMS MQ connection is disabled while an MQ session is open, the call will fail with reason code MQRC_Q_MGR_QUIESCING.
MQPUT
MQPUT places a message on a queue.
MQPUT(ConnectionHandle,
ObjectHandle
, MessageDescriptor,
MQPMOStructure, BufferLength, Buffer, CompCode, RsnCode)
Usage Notes
 
  • Unless MQPMO_NO_SYNCPOINT is specified, IDMS considers the MQ session to have uncommitted changes.
  • When the MQPMO_FAIL_IF_QUIESCING option is used, if the CA IDMS MQ connection is disabled while an MQ session is open, the call will fail with reason code MQRC_Q_MGR_QUIESCING.
MQPUT1
MQPUT1 places a single message on a queue.
MQPUT1 (
ConnectionHandle
, ObjectDescriptor,
MessageDescriptor
, PutMsgOpts, BufferLength, Buffer, CompCode,
RsnCode
)
Usage Notes
 
  • Unless MQPMO_NO_SYNCPOINT is specified, IDMS considers the MQ session to have uncommitted changes.
  • If no session exists, a session is allocated.  
  • When a session is allocated for the call, it is released after the call when MQPMO_NO_SYNCPOINT is specifed.
  • When the MQPMO_FAIL_IF_QUIESCING option is used, if the CA IDMS MQ connection is disabled while an MQ session is open, the call will fail with reason code MQRC_Q_MGR_QUIESCING.
MQSET
MQSET sets object attributes.
MQSET(ConnectionHandle,
ObjectHandle
, SelectorCount, Selectors, IntegerAttrCount, IntegerAttrs, CharAttrLength, CharAttrs, CompCode, RsnCode)
Usage Note
 
  • No IDMS requirements.
MQSTAT
MQSTAT retrieves status information for asynchronous messages.
MQSTAT
(ConnectionHandle, Type, Stat, CompCode, RsnCode)
Usage Notes
 
  • No IDMS requirements.
  • If no session exists, a session is allocated.  
  • When a session is allocated for the call, the session is released after the call.