diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_TElDRU5TRQ==
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,48 @@
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between Dariusz Suchojad
+("DS"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("PyMQI") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, DS
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use PyMQI
+alone or in any derivative version, provided, however, that DS's
+License Agreement and DS's notice of copyright, i.e., "Copyright (c)
+2008, 2009, 2010, 2011, 2012, 2013 Dariusz Suchojad; All Rights Reserved"
+are retained in PyMQI alone or in any derivative version prepared
+by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates PyMQI or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to PyMQI.
+
+4. DS is making PyMQI available to Licensee on an "AS IS"
+basis.  DS MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, DS MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYMQI WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. DS SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYMQI
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYMQI,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between DS and
+Licensee.  This License Agreement does not grant permission to use DS
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_UkVBRE1F
--- /dev/null
+++ b/README
@@ -0,0 +1,49 @@
+
+PyMQI 1.3 - Python interface to WebSphere MQ (MQSeries)
+-------------------------------------------------------
+
+PyMQI allows one to connect to queue managers to issue MQAI and PCF requests.
+
+Consider the code below which establishes a connection and puts a message
+on a queue.
+
+::
+
+    import pymqi
+    
+    queue_manager = 'QM01'
+    channel = 'SVRCONN.1'
+    host = '192.168.1.135'
+    port = '1434'
+    conn_info = '%s(%s)' % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    qmgr.disconnect()
+
+
+More usage examples can be found here https://pythonhosted.org/pymqi/examples.html
+
+Supported MQ versions
+=====================
+
+Any MQ version between 5.0 and 7.5 will work however the author is able to provide
+free support only for the following platforms and versions
+
+========== ========= ============
+MQ version OS        Architecture
+========== ========= ============
+7.0.x      Linux x86 32-bit
+7.0.x      Linux x86 64-bit
+7.1.x      Linux x86 32-bit
+7.1.x      Linux x86 64-bit
+7.5.x      Linux x86 32-bit
+7.5.x      Linux x86 64-bit
+========== ========= ============
+
+Other versions and systems need someone from the commnuity to provide free support
+or contacting the author dsuch@gefira.pl in order to discuss paid support options.
+
+More information
+================
+
+Please visit the main documentation at https://pythonhosted.org/pymqi/examples.html for more information
diff --git a/code/CMQC.py b/code/CMQC.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9DTVFDLnB5
--- /dev/null
+++ b/code/CMQC.py
@@ -0,0 +1,2094 @@
+# Generated by h2py from /opt/mqm/inc/cmqc.h
+
+from struct import calcsize
+
+# 64bit
+if calcsize("P") == 8:
+    MQOD_CURRENT_LENGTH = 424
+    MQPMO_CURRENT_LENGTH = 184
+else:
+    MQOD_CURRENT_LENGTH = 400
+    MQPMO_CURRENT_LENGTH = 176
+
+MQAIR_STRUC_ID = "AIR "
+MQAIR_VERSION_1 = 1
+MQAIR_CURRENT_VERSION = 1
+MQAIT_CRL_LDAP = 1
+MQBMHO_STRUC_ID = "BMHO"
+MQBMHO_VERSION_1 = 1
+MQBMHO_CURRENT_VERSION = 1
+MQBMHO_NONE = 0x00000000
+MQBMHO_DELETE_PROPERTIES = 0x00000001
+MQBO_STRUC_ID = "BO  "
+MQBO_VERSION_1 = 1
+MQBO_CURRENT_VERSION = 1
+MQBO_NONE = 0x00000000
+MQCBC_STRUC_ID = "CBC "
+MQCBC_VERSION_1 = 1
+MQCBC_CURRENT_VERSION = 1
+MQCBCF_NONE = 0x00000000
+MQCBCF_READA_BUFFER_EMPTY = 0x00000001
+MQCBCT_START_CALL = 1
+MQCBCT_STOP_CALL = 2
+MQCBCT_REGISTER_CALL = 3
+MQCBCT_DEREGISTER_CALL = 4
+MQCBCT_EVENT_CALL = 5
+MQCBCT_MSG_REMOVED = 6
+MQCBCT_MSG_NOT_REMOVED = 7
+MQCS_NONE = 0
+MQCS_SUSPENDED_TEMPORARY = 1
+MQCS_SUSPENDED_USER_ACTION = 2
+MQCS_SUSPENDED = 3
+MQCS_STOPPED = 4
+MQCBD_STRUC_ID = "CBD "
+MQCBD_VERSION_1 = 1
+MQCBD_CURRENT_VERSION = 1
+MQCBDO_NONE = 0x00000000
+MQCBDO_START_CALL = 0x00000001
+MQCBDO_STOP_CALL = 0x00000004
+MQCBDO_REGISTER_CALL = 0x00000100
+MQCBDO_DEREGISTER_CALL = 0x00000200
+MQCBDO_FAIL_IF_QUIESCING = 0x00002000
+MQCBT_MESSAGE_CONSUMER = 0x00000001
+MQCBT_EVENT_HANDLER = 0x00000002
+MQCBD_FULL_MSG_LENGTH = (-1)
+MQVS_NULL_TERMINATED = (-1)
+MQCIH_STRUC_ID = "CIH "
+MQCIH_VERSION_1 = 1
+MQCIH_VERSION_2 = 2
+MQCIH_CURRENT_VERSION = 2
+MQCIH_LENGTH_1 = 164
+MQCIH_LENGTH_2 = 180
+MQCIH_CURRENT_LENGTH = 180
+MQCIH_NONE = 0x00000000
+MQCIH_PASS_EXPIRATION = 0x00000001
+MQCIH_UNLIMITED_EXPIRATION = 0x00000000
+MQCIH_REPLY_WITHOUT_NULLS = 0x00000002
+MQCIH_REPLY_WITH_NULLS = 0x00000000
+MQCIH_SYNC_ON_RETURN = 0x00000004
+MQCIH_NO_SYNC_ON_RETURN = 0x00000000
+MQCRC_OK = 0
+MQCRC_CICS_EXEC_ERROR = 1
+MQCRC_MQ_API_ERROR = 2
+MQCRC_BRIDGE_ERROR = 3
+MQCRC_BRIDGE_ABEND = 4
+MQCRC_APPLICATION_ABEND = 5
+MQCRC_SECURITY_ERROR = 6
+MQCRC_PROGRAM_NOT_AVAILABLE = 7
+MQCRC_BRIDGE_TIMEOUT = 8
+MQCRC_TRANSID_NOT_AVAILABLE = 9
+MQCUOWC_ONLY = 0x00000111
+MQCUOWC_CONTINUE = 0x00010000
+MQCUOWC_FIRST = 0x00000011
+MQCUOWC_MIDDLE = 0x00000010
+MQCUOWC_LAST = 0x00000110
+MQCUOWC_COMMIT = 0x00000100
+MQCUOWC_BACKOUT = 0x00001100
+MQCGWI_DEFAULT = (-2)
+MQCLT_PROGRAM = 1
+MQCLT_TRANSACTION = 2
+MQCODL_AS_INPUT = (-1)
+MQCADSD_NONE = 0x00000000
+MQCADSD_SEND = 0x00000001
+MQCADSD_RECV = 0x00000010
+MQCADSD_MSGFORMAT = 0x00000100
+MQCCT_YES = 0x00000001
+MQCCT_NO = 0x00000000
+MQCTES_NOSYNC = 0x00000000
+MQCTES_COMMIT = 0x00000100
+MQCTES_BACKOUT = 0x00001100
+MQCTES_ENDTASK = 0x00010000
+MQCFAC_NONE = "\0\0\0\0\0\0\0\0"
+MQCFUNC_MQCONN = "CONN"
+MQCFUNC_MQGET = "GET "
+MQCFUNC_MQINQ = "INQ "
+MQCFUNC_MQOPEN = "OPEN"
+MQCFUNC_MQPUT = "PUT "
+MQCFUNC_MQPUT1 = "PUT1"
+MQCFUNC_NONE = "    "
+MQCSC_START = "S   "
+MQCSC_STARTDATA = "SD  "
+MQCSC_TERMINPUT = "TD  "
+MQCSC_NONE = "    "
+MQCMHO_STRUC_ID = "CMHO"
+MQCMHO_VERSION_1 = 1
+MQCMHO_CURRENT_VERSION = 1
+MQCMHO_DEFAULT_VALIDATION = 0x00000000
+MQCMHO_NO_VALIDATION = 0x00000001
+MQCMHO_VALIDATE = 0x00000002
+MQCMHO_NONE = 0x00000000
+MQCNO_STRUC_ID = "CNO "
+MQCNO_VERSION_1 = 1
+MQCNO_VERSION_2 = 2
+MQCNO_VERSION_3 = 3
+MQCNO_VERSION_4 = 4
+MQCNO_VERSION_5 = 5
+MQCNO_CURRENT_VERSION = 5
+MQCNO_STANDARD_BINDING = 0x00000000
+MQCNO_FASTPATH_BINDING = 0x00000001
+MQCNO_SERIALIZE_CONN_TAG_Q_MGR = 0x00000002
+MQCNO_SERIALIZE_CONN_TAG_QSG = 0x00000004
+MQCNO_RESTRICT_CONN_TAG_Q_MGR = 0x00000008
+MQCNO_RESTRICT_CONN_TAG_QSG = 0x00000010
+MQCNO_HANDLE_SHARE_NONE = 0x00000020
+MQCNO_HANDLE_SHARE_BLOCK = 0x00000040
+MQCNO_HANDLE_SHARE_NO_BLOCK = 0x00000080
+MQCNO_SHARED_BINDING = 0x00000100
+MQCNO_ISOLATED_BINDING = 0x00000200
+MQCNO_ACCOUNTING_MQI_ENABLED = 0x00001000
+MQCNO_ACCOUNTING_MQI_DISABLED = 0x00002000
+MQCNO_ACCOUNTING_Q_ENABLED = 0x00004000
+MQCNO_ACCOUNTING_Q_DISABLED = 0x00008000
+MQCNO_NO_CONV_SHARING = 0x00010000
+MQCNO_ALL_CONVS_SHARE = 0x00040000
+MQCNO_CD_FOR_OUTPUT_ONLY = 0x00080000
+MQCNO_USE_CD_SELECTION = 0x00100000
+MQCNO_NONE = 0x00000000
+MQCT_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                   "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQCONNID_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0"\
+                       "\0\0\0\0\0\0\0\0\0\0\0\0"
+MQCSP_STRUC_ID = "CSP "
+MQCSP_VERSION_1 = 1
+MQCSP_CURRENT_VERSION = 1
+MQCSP_AUTH_NONE = 0
+MQCSP_AUTH_USER_ID_AND_PWD = 1
+MQCTLO_STRUC_ID = "CTLO"
+MQCTLO_VERSION_1 = 1
+MQCTLO_CURRENT_VERSION = 1
+MQCTLO_NONE = 0x00000000
+MQCTLO_THREAD_AFFINITY = 0x00000001
+MQCTLO_FAIL_IF_QUIESCING = 0x00002000
+MQDH_STRUC_ID = "DH  "
+MQDH_VERSION_1 = 1
+MQDH_CURRENT_VERSION = 1
+MQDHF_NEW_MSG_IDS = 0x00000001
+MQDHF_NONE = 0x00000000
+MQDLH_STRUC_ID = "DLH "
+MQDLH_VERSION_1 = 1
+MQDLH_CURRENT_VERSION = 1
+MQDMHO_STRUC_ID = "DMHO"
+MQDMHO_VERSION_1 = 1
+MQDMHO_CURRENT_VERSION = 1
+MQDMHO_NONE = 0x00000000
+MQDMPO_STRUC_ID = "DMPO"
+MQDMPO_VERSION_1 = 1
+MQDMPO_CURRENT_VERSION = 1
+MQDMPO_DEL_FIRST = 0x00000000
+MQDMPO_DEL_PROP_UNDER_CURSOR = 0x00000001
+MQDMPO_NONE = 0x00000000
+MQGMO_STRUC_ID = "GMO "
+MQGMO_VERSION_1 = 1
+MQGMO_VERSION_2 = 2
+MQGMO_VERSION_3 = 3
+MQGMO_VERSION_4 = 4
+MQGMO_CURRENT_VERSION = 4
+MQGMO_WAIT = 0x00000001
+MQGMO_NO_WAIT = 0x00000000
+MQGMO_SET_SIGNAL = 0x00000008
+MQGMO_FAIL_IF_QUIESCING = 0x00002000
+MQGMO_SYNCPOINT = 0x00000002
+MQGMO_SYNCPOINT_IF_PERSISTENT = 0x00001000
+MQGMO_NO_SYNCPOINT = 0x00000004
+MQGMO_MARK_SKIP_BACKOUT = 0x00000080
+MQGMO_BROWSE_FIRST = 0x00000010
+MQGMO_BROWSE_NEXT = 0x00000020
+MQGMO_BROWSE_MSG_UNDER_CURSOR = 0x00000800
+MQGMO_MSG_UNDER_CURSOR = 0x00000100
+MQGMO_LOCK = 0x00000200
+MQGMO_UNLOCK = 0x00000400
+MQGMO_ACCEPT_TRUNCATED_MSG = 0x00000040
+MQGMO_CONVERT = 0x00004000
+MQGMO_LOGICAL_ORDER = 0x00008000
+MQGMO_COMPLETE_MSG = 0x00010000
+MQGMO_ALL_MSGS_AVAILABLE = 0x00020000
+MQGMO_ALL_SEGMENTS_AVAILABLE = 0x00040000
+MQGMO_MARK_BROWSE_HANDLE = 0x00100000
+MQGMO_MARK_BROWSE_CO_OP = 0x00200000
+MQGMO_UNMARK_BROWSE_CO_OP = 0x00400000
+MQGMO_UNMARK_BROWSE_HANDLE = 0x00800000
+MQGMO_UNMARKED_BROWSE_MSG = 0x01000000
+MQGMO_PROPERTIES_FORCE_MQRFH2 = 0x02000000
+MQGMO_NO_PROPERTIES = 0x04000000
+MQGMO_PROPERTIES_IN_HANDLE = 0x08000000
+MQGMO_PROPERTIES_COMPATIBILITY = 0x10000000
+MQGMO_PROPERTIES_AS_Q_DEF = 0x00000000
+MQGMO_NONE = 0x00000000
+MQWI_UNLIMITED = (-1)
+MQEC_MSG_ARRIVED = 2
+MQEC_WAIT_INTERVAL_EXPIRED = 3
+MQEC_WAIT_CANCELED = 4
+MQEC_Q_MGR_QUIESCING = 5
+MQEC_CONNECTION_QUIESCING = 6
+MQMO_MATCH_MSG_ID = 0x00000001
+MQMO_MATCH_CORREL_ID = 0x00000002
+MQMO_MATCH_GROUP_ID = 0x00000004
+MQMO_MATCH_MSG_SEQ_NUMBER = 0x00000008
+MQMO_MATCH_OFFSET = 0x00000010
+MQMO_MATCH_MSG_TOKEN = 0x00000020
+MQMO_NONE = 0x00000000
+MQMTOK_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQRL_UNDEFINED = (-1)
+MQIIH_STRUC_ID = "IIH "
+MQIIH_VERSION_1 = 1
+MQIIH_CURRENT_VERSION = 1
+MQIIH_LENGTH_1 = 84
+MQIIH_NONE = 0x00000000
+MQIIH_PASS_EXPIRATION = 0x00000001
+MQIIH_UNLIMITED_EXPIRATION = 0x00000000
+MQIIH_REPLY_FORMAT_NONE = 0x00000008
+MQIAUT_NONE = "        "
+MQITII_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQIMPO_STRUC_ID = "IMPO"
+MQIMPO_VERSION_1 = 1
+MQIMPO_CURRENT_VERSION = 1
+MQIMPO_CONVERT_TYPE = 0x00000002
+MQIMPO_QUERY_LENGTH = 0x00000004
+MQIMPO_INQ_FIRST = 0x00000000
+MQIMPO_INQ_NEXT = 0x00000008
+MQIMPO_INQ_PROP_UNDER_CURSOR = 0x00000010
+MQIMPO_CONVERT_VALUE = 0x00000020
+MQIMPO_NONE = 0x00000000
+MQMD_STRUC_ID = "MD  "
+MQMD_VERSION_1 = 1
+MQMD_VERSION_2 = 2
+MQMD_CURRENT_VERSION = 2
+MQRO_EXCEPTION = 0x01000000
+MQRO_EXCEPTION_WITH_DATA = 0x03000000
+MQRO_EXCEPTION_WITH_FULL_DATA = 0x07000000
+MQRO_EXPIRATION = 0x00200000
+MQRO_EXPIRATION_WITH_DATA = 0x00600000
+MQRO_EXPIRATION_WITH_FULL_DATA = 0x00E00000
+MQRO_COA = 0x00000100
+MQRO_COA_WITH_DATA = 0x00000300
+MQRO_COA_WITH_FULL_DATA = 0x00000700
+MQRO_COD = 0x00000800
+MQRO_COD_WITH_DATA = 0x00001800
+MQRO_COD_WITH_FULL_DATA = 0x00003800
+MQRO_PAN = 0x00000001
+MQRO_NAN = 0x00000002
+MQRO_ACTIVITY = 0x00000004
+MQRO_NEW_MSG_ID = 0x00000000
+MQRO_PASS_MSG_ID = 0x00000080
+MQRO_COPY_MSG_ID_TO_CORREL_ID = 0x00000000
+MQRO_PASS_CORREL_ID = 0x00000040
+MQRO_DEAD_LETTER_Q = 0x00000000
+MQRO_DISCARD_MSG = 0x08000000
+MQRO_PASS_DISCARD_AND_EXPIRY = 0x00004000
+MQRO_NONE = 0x00000000
+MQRO_REJECT_UNSUP_MASK = 0x101C0000
+MQRO_ACCEPT_UNSUP_MASK = (-270532353)
+MQRO_ACCEPT_UNSUP_IF_XMIT_MASK = 0x0003FF00
+MQMT_SYSTEM_FIRST = 1
+MQMT_REQUEST = 1
+MQMT_REPLY = 2
+MQMT_DATAGRAM = 8
+MQMT_REPORT = 4
+MQMT_MQE_FIELDS_FROM_MQE = 112
+MQMT_MQE_FIELDS = 113
+MQMT_SYSTEM_LAST = 65535
+MQMT_APPL_FIRST = 65536
+MQMT_APPL_LAST = 999999999
+MQEI_UNLIMITED = (-1)
+MQFB_NONE = 0
+MQFB_SYSTEM_FIRST = 1
+MQFB_QUIT = 256
+MQFB_EXPIRATION = 258
+MQFB_COA = 259
+MQFB_COD = 260
+MQFB_CHANNEL_COMPLETED = 262
+MQFB_CHANNEL_FAIL_RETRY = 263
+MQFB_CHANNEL_FAIL = 264
+MQFB_APPL_CANNOT_BE_STARTED = 265
+MQFB_TM_ERROR = 266
+MQFB_APPL_TYPE_ERROR = 267
+MQFB_STOPPED_BY_MSG_EXIT = 268
+MQFB_ACTIVITY = 269
+MQFB_XMIT_Q_MSG_ERROR = 271
+MQFB_PAN = 275
+MQFB_NAN = 276
+MQFB_STOPPED_BY_CHAD_EXIT = 277
+MQFB_STOPPED_BY_PUBSUB_EXIT = 279
+MQFB_NOT_A_REPOSITORY_MSG = 280
+MQFB_BIND_OPEN_CLUSRCVR_DEL = 281
+MQFB_MAX_ACTIVITIES = 282
+MQFB_NOT_FORWARDED = 283
+MQFB_NOT_DELIVERED = 284
+MQFB_UNSUPPORTED_FORWARDING = 285
+MQFB_UNSUPPORTED_DELIVERY = 286
+MQFB_DATA_LENGTH_ZERO = 291
+MQFB_DATA_LENGTH_NEGATIVE = 292
+MQFB_DATA_LENGTH_TOO_BIG = 293
+MQFB_BUFFER_OVERFLOW = 294
+MQFB_LENGTH_OFF_BY_ONE = 295
+MQFB_IIH_ERROR = 296
+MQFB_NOT_AUTHORIZED_FOR_IMS = 298
+MQFB_IMS_ERROR = 300
+MQFB_IMS_FIRST = 301
+MQFB_IMS_LAST = 399
+MQFB_CICS_INTERNAL_ERROR = 401
+MQFB_CICS_NOT_AUTHORIZED = 402
+MQFB_CICS_BRIDGE_FAILURE = 403
+MQFB_CICS_CORREL_ID_ERROR = 404
+MQFB_CICS_CCSID_ERROR = 405
+MQFB_CICS_ENCODING_ERROR = 406
+MQFB_CICS_CIH_ERROR = 407
+MQFB_CICS_UOW_ERROR = 408
+MQFB_CICS_COMMAREA_ERROR = 409
+MQFB_CICS_APPL_NOT_STARTED = 410
+MQFB_CICS_APPL_ABENDED = 411
+MQFB_CICS_DLQ_ERROR = 412
+MQFB_CICS_UOW_BACKED_OUT = 413
+MQFB_PUBLICATIONS_ON_REQUEST = 501
+MQFB_SUBSCRIBER_IS_PUBLISHER = 502
+MQFB_MSG_SCOPE_MISMATCH = 503
+MQFB_SELECTOR_MISMATCH = 504
+MQFB_SYSTEM_LAST = 65535
+MQFB_APPL_FIRST = 65536
+MQFB_APPL_LAST = 999999999
+MQENC_NATIVE = 0x00000222
+MQENC_INTEGER_MASK = 0x0000000F
+MQENC_DECIMAL_MASK = 0x000000F0
+MQENC_FLOAT_MASK = 0x00000F00
+MQENC_RESERVED_MASK = (-4096)
+MQENC_INTEGER_UNDEFINED = 0x00000000
+MQENC_INTEGER_NORMAL = 0x00000001
+MQENC_INTEGER_REVERSED = 0x00000002
+MQENC_DECIMAL_UNDEFINED = 0x00000000
+MQENC_DECIMAL_NORMAL = 0x00000010
+MQENC_DECIMAL_REVERSED = 0x00000020
+MQENC_FLOAT_UNDEFINED = 0x00000000
+MQENC_FLOAT_IEEE_NORMAL = 0x00000100
+MQENC_FLOAT_IEEE_REVERSED = 0x00000200
+MQENC_FLOAT_S390 = 0x00000300
+MQENC_FLOAT_TNS = 0x00000400
+MQCCSI_UNDEFINED = 0
+MQCCSI_DEFAULT = 0
+MQCCSI_Q_MGR = 0
+MQCCSI_INHERIT = (-2)
+MQCCSI_EMBEDDED = (-1)
+MQCCSI_APPL = (-3)
+MQFMT_NONE = "        "
+MQFMT_ADMIN = "MQADMIN "
+MQFMT_CHANNEL_COMPLETED = "MQCHCOM "
+MQFMT_CICS = "MQCICS  "
+MQFMT_COMMAND_1 = "MQCMD1  "
+MQFMT_COMMAND_2 = "MQCMD2  "
+MQFMT_DEAD_LETTER_HEADER = "MQDEAD  "
+MQFMT_DIST_HEADER = "MQHDIST "
+MQFMT_EMBEDDED_PCF = "MQHEPCF "
+MQFMT_EVENT = "MQEVENT "
+MQFMT_IMS = "MQIMS   "
+MQFMT_IMS_VAR_STRING = "MQIMSVS "
+MQFMT_MD_EXTENSION = "MQHMDE  "
+MQFMT_PCF = "MQPCF   "
+MQFMT_REF_MSG_HEADER = "MQHREF  "
+MQFMT_RF_HEADER = "MQHRF   "
+MQFMT_RF_HEADER_1 = "MQHRF   "
+MQFMT_RF_HEADER_2 = "MQHRF2  "
+MQFMT_STRING = "MQSTR   "
+MQFMT_TRIGGER = "MQTRIG  "
+MQFMT_WORK_INFO_HEADER = "MQHWIH  "
+MQFMT_XMIT_Q_HEADER = "MQXMIT  "
+MQPRI_PRIORITY_AS_Q_DEF = (-1)
+MQPRI_PRIORITY_AS_PARENT = (-2)
+MQPRI_PRIORITY_AS_PUBLISHED = (-3)
+MQPRI_PRIORITY_AS_TOPIC_DEF = (-1)
+MQPER_PERSISTENCE_AS_PARENT = (-1)
+MQPER_NOT_PERSISTENT = 0
+MQPER_PERSISTENT = 1
+MQPER_PERSISTENCE_AS_Q_DEF = 2
+MQPER_PERSISTENCE_AS_TOPIC_DEF = 2
+MQPRT_RESPONSE_AS_PARENT = 0
+MQPRT_SYNC_RESPONSE = 1
+MQPRT_ASYNC_RESPONSE = 2
+MQMI_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQCI_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0"\
+                          "\0\0\0\0\0\0\0\0\0\0\0\0"
+MQCI_NEW_SESSION = "\x41\x4D\x51\x21\x4E\x45\x57\x5F"\
+                          "\x53\x45\x53\x53\x49\x4F\x4E\x5F"\
+                          "\x43\x4F\x52\x52\x45\x4C\x49\x44"
+MQACT_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQAT_UNKNOWN = (-1)
+MQAT_NO_CONTEXT = 0
+MQAT_CICS = 1
+MQAT_MVS = 2
+MQAT_OS390 = 2
+MQAT_ZOS = 2
+MQAT_IMS = 3
+MQAT_OS2 = 4
+MQAT_DOS = 5
+MQAT_AIX = 6
+MQAT_UNIX = 6
+MQAT_QMGR = 7
+MQAT_OS400 = 8
+MQAT_WINDOWS = 9
+MQAT_CICS_VSE = 10
+MQAT_WINDOWS_NT = 11
+MQAT_VMS = 12
+MQAT_GUARDIAN = 13
+MQAT_NSK = 13
+MQAT_VOS = 14
+MQAT_OPEN_TP1 = 15
+MQAT_VM = 18
+MQAT_IMS_BRIDGE = 19
+MQAT_XCF = 20
+MQAT_CICS_BRIDGE = 21
+MQAT_NOTES_AGENT = 22
+MQAT_TPF = 23
+MQAT_USER = 25
+MQAT_BROKER = 26
+MQAT_QMGR_PUBLISH = 26
+MQAT_JAVA = 28
+MQAT_DQM = 29
+MQAT_CHANNEL_INITIATOR = 30
+MQAT_WLM = 31
+MQAT_BATCH = 32
+MQAT_RRS_BATCH = 33
+MQAT_SIB = 34
+MQAT_DEFAULT = 6
+MQAT_USER_FIRST = 65536
+MQAT_USER_LAST = 999999999
+MQGI_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQMF_SEGMENTATION_INHIBITED = 0x00000000
+MQMF_SEGMENTATION_ALLOWED = 0x00000001
+MQMF_MSG_IN_GROUP = 0x00000008
+MQMF_LAST_MSG_IN_GROUP = 0x00000010
+MQMF_SEGMENT = 0x00000002
+MQMF_LAST_SEGMENT = 0x00000004
+MQMF_NONE = 0x00000000
+MQMF_REJECT_UNSUP_MASK = 0x00000FFF
+MQMF_ACCEPT_UNSUP_MASK = (-1048576)
+MQMF_ACCEPT_UNSUP_IF_XMIT_MASK = 0x000FF000
+MQOL_UNDEFINED = (-1)
+MQMDE_STRUC_ID = "MDE "
+MQMDE_VERSION_2 = 2
+MQMDE_CURRENT_VERSION = 2
+MQMDE_LENGTH_2 = 72
+MQMDEF_NONE = 0x00000000
+MQMHBO_STRUC_ID = "MHBO"
+MQMHBO_VERSION_1 = 1
+MQMHBO_CURRENT_VERSION = 1
+MQMHBO_PROPERTIES_IN_MQRFH2 = 0x00000001
+MQMHBO_DELETE_PROPERTIES = 0x00000002
+MQMHBO_NONE = 0x00000000
+MQOD_STRUC_ID = "OD  "
+MQOD_VERSION_1 = 1
+MQOD_VERSION_2 = 2
+MQOD_VERSION_3 = 3
+MQOD_VERSION_4 = 4
+MQOD_CURRENT_VERSION = 4
+MQOM_NO = 0
+MQOM_YES = 1
+MQOT_NONE = 0
+MQOT_Q = 1
+MQOT_NAMELIST = 2
+MQOT_PROCESS = 3
+MQOT_STORAGE_CLASS = 4
+MQOT_Q_MGR = 5
+MQOT_CHANNEL = 6
+MQOT_AUTH_INFO = 7
+MQOT_TOPIC = 8
+MQOT_CF_STRUC = 10
+MQOT_LISTENER = 11
+MQOT_SERVICE = 12
+MQOT_RESERVED_1 = 999
+MQOT_ALL = 1001
+MQOT_ALIAS_Q = 1002
+MQOT_MODEL_Q = 1003
+MQOT_LOCAL_Q = 1004
+MQOT_REMOTE_Q = 1005
+MQOT_SENDER_CHANNEL = 1007
+MQOT_SERVER_CHANNEL = 1008
+MQOT_REQUESTER_CHANNEL = 1009
+MQOT_RECEIVER_CHANNEL = 1010
+MQOT_CURRENT_CHANNEL = 1011
+MQOT_SAVED_CHANNEL = 1012
+MQOT_SVRCONN_CHANNEL = 1013
+MQOT_CLNTCONN_CHANNEL = 1014
+MQOT_SHORT_CHANNEL = 1015
+MQPD_STRUC_ID = "PD  "
+MQPD_VERSION_1 = 1
+MQPD_CURRENT_VERSION = 1
+MQPD_NONE = 0x00000000
+MQPD_SUPPORT_OPTIONAL = 0x00000001
+MQPD_SUPPORT_REQUIRED = 0x00100000
+MQPD_SUPPORT_REQUIRED_IF_LOCAL = 0x00000400
+MQPD_REJECT_UNSUP_MASK = (-1048576)
+MQPD_ACCEPT_UNSUP_IF_XMIT_MASK = 0x000FFC00
+MQPD_ACCEPT_UNSUP_MASK = 0x000003FF
+MQPD_NO_CONTEXT = 0x00000000
+MQPD_USER_CONTEXT = 0x00000001
+MQCOPY_NONE = 0x00000000
+MQCOPY_ALL = 0x00000001
+MQCOPY_FORWARD = 0x00000002
+MQCOPY_PUBLISH = 0x00000004
+MQCOPY_REPLY = 0x00000008
+MQCOPY_REPORT = 0x00000010
+MQCOPY_DEFAULT = 0x00000016
+MQSD_STRUC_ID = "SD  "
+MQSD_VERSION_1 = 1
+MQSD_CURRENT_VERSION = 1
+MQSID_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQPMO_STRUC_ID = "PMO "
+MQPMO_VERSION_1 = 1
+MQPMO_VERSION_2 = 2
+MQPMO_VERSION_3 = 3
+MQPMO_CURRENT_VERSION = 3
+MQPMO_SYNCPOINT = 0x00000002
+MQPMO_NO_SYNCPOINT = 0x00000004
+MQPMO_DEFAULT_CONTEXT = 0x00000020
+MQPMO_NEW_MSG_ID = 0x00000040
+MQPMO_NEW_CORREL_ID = 0x00000080
+MQPMO_PASS_IDENTITY_CONTEXT = 0x00000100
+MQPMO_PASS_ALL_CONTEXT = 0x00000200
+MQPMO_SET_IDENTITY_CONTEXT = 0x00000400
+MQPMO_SET_ALL_CONTEXT = 0x00000800
+MQPMO_ALTERNATE_USER_AUTHORITY = 0x00001000
+MQPMO_FAIL_IF_QUIESCING = 0x00002000
+MQPMO_NO_CONTEXT = 0x00004000
+MQPMO_LOGICAL_ORDER = 0x00008000
+MQPMO_ASYNC_RESPONSE = 0x00010000
+MQPMO_SYNC_RESPONSE = 0x00020000
+MQPMO_RESOLVE_LOCAL_Q = 0x00040000
+MQPMO_RETAIN = 0x00200000
+MQPMO_MD_FOR_OUTPUT_ONLY = 0x00800000
+MQPMO_SCOPE_QMGR = 0x04000000
+MQPMO_SUPPRESS_REPLYTO = 0x08000000
+MQPMO_NOT_OWN_SUBS = 0x10000000
+MQPMO_RESPONSE_AS_Q_DEF = 0x00000000
+MQPMO_RESPONSE_AS_TOPIC_DEF = 0x00000000
+MQPMO_NONE = 0x00000000
+MQPMO_PUB_OPTIONS_MASK = 0x00200000
+MQPMRF_MSG_ID = 0x00000001
+MQPMRF_CORREL_ID = 0x00000002
+MQPMRF_GROUP_ID = 0x00000004
+MQPMRF_FEEDBACK = 0x00000008
+MQPMRF_ACCOUNTING_TOKEN = 0x00000010
+MQPMRF_NONE = 0x00000000
+MQACTP_NEW = 0
+MQACTP_FORWARD = 1
+MQACTP_REPLY = 2
+MQACTP_REPORT = 3
+MQRFH_STRUC_ID = "RFH "
+MQRFH_VERSION_1 = 1
+MQRFH_VERSION_2 = 2
+MQRFH_STRUC_LENGTH_FIXED = 32
+MQRFH_STRUC_LENGTH_FIXED_2 = 36
+MQRFH_NONE = 0x00000000
+MQRFH_NO_FLAGS = 0
+MQNVS_APPL_TYPE = "OPT_APP_GRP "
+MQNVS_MSG_TYPE = "OPT_MSG_TYPE "
+MQRMH_STRUC_ID = "RMH "
+MQRMH_VERSION_1 = 1
+MQRMH_CURRENT_VERSION = 1
+MQRMHF_LAST = 0x00000001
+MQRMHF_NOT_LAST = 0x00000000
+MQOII_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQSCO_STRUC_ID = "SCO "
+MQSCO_VERSION_1 = 1
+MQSCO_VERSION_2 = 2
+MQSCO_CURRENT_VERSION = 2
+MQSCO_RESET_COUNT_DEFAULT = 0
+MQSMPO_STRUC_ID = "SMPO"
+MQSMPO_VERSION_1 = 1
+MQSMPO_CURRENT_VERSION = 1
+MQSMPO_SET_FIRST = 0x00000000
+MQSMPO_SET_PROP_UNDER_CURSOR = 0x00000001
+MQSMPO_SET_PROP_AFTER_CURSOR = 0x00000002
+MQSMPO_APPEND_PROPERTY = 0x00000004
+MQSMPO_SET_PROP_BEFORE_CURSOR = 0x00000008
+MQSMPO_NONE = 0x00000000
+MQSRO_STRUC_ID = "SRO "
+MQSRO_VERSION_1 = 1
+MQSRO_CURRENT_VERSION = 1
+MQSRO_NONE = 0x00000000
+MQSRO_FAIL_IF_QUIESCING = 0x00002000
+MQSTS_STRUC_ID = "STAT"
+MQSTS_VERSION_1 = 1
+MQSTS_CURRENT_VERSION = 1
+MQTM_STRUC_ID = "TM  "
+MQTM_VERSION_1 = 1
+MQTM_CURRENT_VERSION = 1
+MQTMC_STRUC_ID = "TMC "
+MQTMC_VERSION_1 = "   1"
+MQTMC_VERSION_2 = "   2"
+MQTMC_CURRENT_VERSION = "   2"
+MQWIH_STRUC_ID = "WIH "
+MQWIH_VERSION_1 = 1
+MQWIH_CURRENT_VERSION = 1
+MQWIH_LENGTH_1 = 120
+MQWIH_CURRENT_LENGTH = 120
+MQWIH_NONE = 0x00000000
+MQXQH_STRUC_ID = "XQH "
+MQXQH_VERSION_1 = 1
+MQXQH_CURRENT_VERSION = 1
+MQHO_UNUSABLE_HOBJ = (-1)
+MQHO_NONE = 0
+MQCO_IMMEDIATE = 0x00000000
+MQCO_NONE = 0x00000000
+MQCO_DELETE = 0x00000001
+MQCO_DELETE_PURGE = 0x00000002
+MQCO_KEEP_SUB = 0x00000004
+MQCO_REMOVE_SUB = 0x00000008
+MQCO_QUIESCE = 0x00000020
+MQOP_START = 0x00000001
+MQOP_START_WAIT = 0x00000002
+MQOP_STOP = 0x00000004
+MQOP_REGISTER = 0x00000100
+MQOP_DEREGISTER = 0x00000200
+MQOP_SUSPEND = 0x00010000
+MQOP_RESUME = 0x00020000
+MQHM_UNUSABLE_HMSG = (-1)
+MQHM_NONE = 0
+MQBA_FIRST = 6001
+MQBA_LAST = 8000
+MQCA_ADMIN_TOPIC_NAME = 2105
+MQCA_ALTERATION_DATE = 2027
+MQCA_ALTERATION_TIME = 2028
+MQCA_APPL_ID = 2001
+MQCA_AUTH_INFO_CONN_NAME = 2053
+MQCA_AUTH_INFO_DESC = 2046
+MQCA_AUTH_INFO_NAME = 2045
+MQCA_AUTO_REORG_CATALOG = 2091
+MQCA_AUTO_REORG_START_TIME = 2090
+MQCA_BACKOUT_REQ_Q_NAME = 2019
+MQCA_BASE_OBJECT_NAME = 2002
+MQCA_BASE_Q_NAME = 2002
+MQCA_BATCH_INTERFACE_ID = 2068
+MQCA_CF_STRUC_DESC = 2052
+MQCA_CF_STRUC_NAME = 2039
+MQCA_CHANNEL_AUTO_DEF_EXIT = 2026
+MQCA_CHILD = 2101
+MQCA_CHINIT_SERVICE_PARM = 2076
+MQCA_CICS_FILE_NAME = 2060
+MQCA_CLUSTER_DATE = 2037
+MQCA_CLUSTER_NAME = 2029
+MQCA_CLUSTER_NAMELIST = 2030
+MQCA_CLUSTER_Q_MGR_NAME = 2031
+MQCA_CLUSTER_TIME = 2038
+MQCA_CLUSTER_WORKLOAD_DATA = 2034
+MQCA_CLUSTER_WORKLOAD_EXIT = 2033
+MQCA_COMMAND_INPUT_Q_NAME = 2003
+MQCA_COMMAND_REPLY_Q_NAME = 2067
+MQCA_CREATION_DATE = 2004
+MQCA_CREATION_TIME = 2005
+MQCA_DEAD_LETTER_Q_NAME = 2006
+MQCA_DEF_XMIT_Q_NAME = 2025
+MQCA_DNS_GROUP = 2071
+MQCA_ENV_DATA = 2007
+MQCA_FIRST = 2001
+MQCA_IGQ_USER_ID = 2041
+MQCA_INITIATION_Q_NAME = 2008
+MQCA_LAST = 4000
+MQCA_LAST_USED = 2108
+MQCA_LDAP_PASSWORD = 2048
+MQCA_LDAP_USER_NAME = 2047
+MQCA_LU_GROUP_NAME = 2072
+MQCA_LU_NAME = 2073
+MQCA_LU62_ARM_SUFFIX = 2074
+MQCA_MODEL_DURABLE_Q = 2096
+MQCA_MODEL_NON_DURABLE_Q = 2097
+MQCA_MONITOR_Q_NAME = 2066
+MQCA_NAMELIST_DESC = 2009
+MQCA_NAMELIST_NAME = 2010
+MQCA_NAMES = 2020
+MQCA_PARENT = 2102
+MQCA_PASS_TICKET_APPL = 2086
+MQCA_PROCESS_DESC = 2011
+MQCA_PROCESS_NAME = 2012
+MQCA_Q_DESC = 2013
+MQCA_Q_MGR_DESC = 2014
+MQCA_Q_MGR_IDENTIFIER = 2032
+MQCA_Q_MGR_NAME = 2015
+MQCA_Q_NAME = 2016
+MQCA_QSG_NAME = 2040
+MQCA_REMOTE_Q_MGR_NAME = 2017
+MQCA_REMOTE_Q_NAME = 2018
+MQCA_REPOSITORY_NAME = 2035
+MQCA_REPOSITORY_NAMELIST = 2036
+MQCA_RESUME_DATE = 2098
+MQCA_RESUME_TIME = 2099
+MQCA_SERVICE_DESC = 2078
+MQCA_SERVICE_NAME = 2077
+MQCA_SERVICE_START_ARGS = 2080
+MQCA_SERVICE_START_COMMAND = 2079
+MQCA_SERVICE_STOP_ARGS = 2082
+MQCA_SERVICE_STOP_COMMAND = 2081
+MQCA_STDERR_DESTINATION = 2084
+MQCA_STDOUT_DESTINATION = 2083
+MQCA_SSL_CRL_NAMELIST = 2050
+MQCA_SSL_CRYPTO_HARDWARE = 2051
+MQCA_SSL_KEY_LIBRARY = 2069
+MQCA_SSL_KEY_MEMBER = 2070
+MQCA_SSL_KEY_REPOSITORY = 2049
+MQCA_STORAGE_CLASS = 2022
+MQCA_STORAGE_CLASS_DESC = 2042
+MQCA_SYSTEM_LOG_Q_NAME = 2065
+MQCA_TCP_NAME = 2075
+MQCA_TOPIC_DESC = 2093
+MQCA_TOPIC_NAME = 2092
+MQCA_TOPIC_STRING_FILTER = 2108
+MQCA_TOPIC_STRING = 2094
+MQCA_TPIPE_NAME = 2085
+MQCA_TRIGGER_CHANNEL_NAME = 2064
+MQCA_TRIGGER_DATA = 2023
+MQCA_TRIGGER_PROGRAM_NAME = 2062
+MQCA_TRIGGER_TERM_ID = 2063
+MQCA_TRIGGER_TRANS_ID = 2061
+MQCA_USER_DATA = 2021
+MQCA_USER_LIST = 4000
+MQCA_XCF_GROUP_NAME = 2043
+MQCA_XCF_MEMBER_NAME = 2044
+MQCA_XMIT_Q_NAME = 2024
+MQIA_ACCOUNTING_CONN_OVERRIDE = 136
+MQIA_ACCOUNTING_INTERVAL = 135
+MQIA_ACCOUNTING_MQI = 133
+MQIA_ACCOUNTING_Q = 134
+MQIA_ACTIVE_CHANNELS = 100
+MQIA_ACTIVITY_RECORDING = 138
+MQIA_ADOPTNEWMCA_CHECK = 102
+MQIA_ADOPTNEWMCA_TYPE = 103
+MQIA_ADOPTNEWMCA_INTERVAL = 104
+MQIA_APPL_TYPE = 1
+MQIA_ARCHIVE = 60
+MQIA_AUTH_INFO_TYPE = 66
+MQIA_AUTHORITY_EVENT = 47
+MQIA_AUTO_REORG_INTERVAL = 174
+MQIA_AUTO_REORGANIZATION = 173
+MQIA_BACKOUT_THRESHOLD = 22
+MQIA_BASE_TYPE = 193
+MQIA_BATCH_INTERFACE_AUTO = 86
+MQIA_BRIDGE_EVENT = 74
+MQIA_CF_LEVEL = 70
+MQIA_CF_RECOVER = 71
+MQIA_CHANNEL_AUTO_DEF = 55
+MQIA_CHANNEL_AUTO_DEF_EVENT = 56
+MQIA_CHANNEL_EVENT = 73
+MQIA_CHINIT_ADAPTERS = 101
+MQIA_CHINIT_CONTROL = 119
+MQIA_CHINIT_DISPATCHERS = 105
+MQIA_CHINIT_TRACE_AUTO_START = 117
+MQIA_CHINIT_TRACE_TABLE_SIZE = 118
+MQIA_CLUSTER_Q_TYPE = 59
+MQIA_CLUSTER_WORKLOAD_LENGTH = 58
+MQIA_CLWL_MRU_CHANNELS = 97
+MQIA_CLWL_Q_RANK = 95
+MQIA_CLWL_Q_PRIORITY = 96
+MQIA_CLWL_USEQ = 98
+MQIA_CMD_SERVER_AUTO = 87
+MQIA_CMD_SERVER_CONTROL = 120
+MQIA_CMD_SERVER_CONVERT_MSG = 88
+MQIA_CMD_SERVER_DLQ_MSG = 89
+MQIA_CODED_CHAR_SET_ID = 2
+MQIA_COMMAND_EVENT = 99
+MQIA_COMMAND_LEVEL = 31
+MQIA_CONFIGURATION_EVENT = 51
+MQIA_CPI_LEVEL = 27
+MQIA_CURRENT_Q_DEPTH = 3
+MQIA_DEF_BIND = 61
+MQIA_DEF_INPUT_OPEN_OPTION = 4
+MQIA_DEF_PERSISTENCE = 5
+MQIA_DEF_PRIORITY = 6
+MQIA_DEF_PUT_RESPONSE_TYPE = 184
+MQIA_DEF_READ_AHEAD = 188
+MQIA_DEFINITION_TYPE = 7
+MQIA_DIST_LISTS = 34
+MQIA_DNS_WLM = 106
+MQIA_DURABLE_SUB = 175
+MQIA_EXPIRY_INTERVAL = 39
+MQIA_FIRST = 1
+MQIA_HARDEN_GET_BACKOUT = 8
+MQIA_HIGH_Q_DEPTH = 36
+MQIA_IGQ_PUT_AUTHORITY = 65
+MQIA_INDEX_TYPE = 57
+MQIA_INHIBIT_EVENT = 48
+MQIA_INHIBIT_GET = 9
+MQIA_INHIBIT_PUB = 181
+MQIA_INHIBIT_PUT = 10
+MQIA_INHIBIT_SUB = 182
+MQIA_INTRA_GROUP_QUEUING = 64
+MQIA_IP_ADDRESS_VERSION = 93
+MQIA_LAST = 2000
+MQIA_LAST_USED = 219
+MQIA_LISTENER_PORT_NUMBER = 85
+MQIA_LISTENER_TIMER = 107
+MQIA_LOGGER_EVENT = 94
+MQIA_LU62_CHANNELS = 108
+MQIA_LOCAL_EVENT = 49
+MQIA_MSG_MARK_BROWSE_INTERVAL = 68
+MQIA_MASTER_ADMIN = 186
+MQIA_MAX_CHANNELS = 109
+MQIA_MAX_CLIENTS = 172
+MQIA_MAX_GLOBAL_LOCKS = 83
+MQIA_MAX_HANDLES = 11
+MQIA_MAX_LOCAL_LOCKS = 84
+MQIA_MAX_MSG_LENGTH = 13
+MQIA_MAX_OPEN_Q = 80
+MQIA_MAX_PRIORITY = 14
+MQIA_MAX_PROPERTIES_LENGTH = 192
+MQIA_MAX_Q_DEPTH = 15
+MQIA_MAX_Q_TRIGGERS = 90
+MQIA_MAX_RECOVERY_TASKS = 171
+MQIA_MAX_UNCOMMITTED_MSGS = 33
+MQIA_MONITOR_INTERVAL = 81
+MQIA_MONITORING_AUTO_CLUSSDR = 124
+MQIA_MONITORING_CHANNEL = 122
+MQIA_MONITORING_Q = 123
+MQIA_MSG_DELIVERY_SEQUENCE = 16
+MQIA_MSG_DEQ_COUNT = 38
+MQIA_MSG_ENQ_COUNT = 37
+MQIA_NAME_COUNT = 19
+MQIA_NAMELIST_TYPE = 72
+MQIA_NPM_CLASS = 78
+MQIA_NPM_DELIVERY = 196
+MQIA_OPEN_INPUT_COUNT = 17
+MQIA_OPEN_OUTPUT_COUNT = 18
+MQIA_OUTBOUND_PORT_MAX = 140
+MQIA_OUTBOUND_PORT_MIN = 110
+MQIA_PAGESET_ID = 62
+MQIA_PERFORMANCE_EVENT = 53
+MQIA_PLATFORM = 32
+MQIA_PM_DELIVERY = 195
+MQIA_PROPERTY_CONTROL = 190
+MQIA_PROXY_SUB = 199
+MQIA_PUB_COUNT = 215
+MQIA_PUB_SCOPE = 219
+MQIA_PUBSUB_MAXMSG_RETRY_COUNT = 206
+MQIA_PUBSUB_MODE = 187
+MQIA_PUBSUB_NP_MSG = 203
+MQIA_PUBSUB_NP_RESP = 205
+MQIA_PUBSUB_SYNC_PT = 207
+MQIA_Q_DEPTH_HIGH_EVENT = 43
+MQIA_Q_DEPTH_HIGH_LIMIT = 40
+MQIA_Q_DEPTH_LOW_EVENT = 44
+MQIA_Q_DEPTH_LOW_LIMIT = 41
+MQIA_Q_DEPTH_MAX_EVENT = 42
+MQIA_Q_SERVICE_INTERVAL = 54
+MQIA_Q_SERVICE_INTERVAL_EVENT = 46
+MQIA_Q_TYPE = 20
+MQIA_Q_USERS = 82
+MQIA_QMOPT_CONS_COMMS_MSGS = 155
+MQIA_QMOPT_CONS_CRITICAL_MSGS = 154
+MQIA_QMOPT_CONS_ERROR_MSGS = 153
+MQIA_QMOPT_CONS_INFO_MSGS = 151
+MQIA_QMOPT_CONS_REORG_MSGS = 156
+MQIA_QMOPT_CONS_SYSTEM_MSGS = 157
+MQIA_QMOPT_CONS_WARNING_MSGS = 152
+MQIA_QMOPT_CSMT_ON_ERROR = 150
+MQIA_QMOPT_INTERNAL_DUMP = 170
+MQIA_QMOPT_LOG_COMMS_MSGS = 162
+MQIA_QMOPT_LOG_CRITICAL_MSGS = 161
+MQIA_QMOPT_LOG_ERROR_MSGS = 160
+MQIA_QMOPT_LOG_INFO_MSGS = 158
+MQIA_QMOPT_LOG_REORG_MSGS = 163
+MQIA_QMOPT_LOG_SYSTEM_MSGS = 164
+MQIA_QMOPT_LOG_WARNING_MSGS = 159
+MQIA_QMOPT_TRACE_COMMS = 166
+MQIA_QMOPT_TRACE_CONVERSION = 168
+MQIA_QMOPT_TRACE_REORG = 167
+MQIA_QMOPT_TRACE_MQI_CALLS = 165
+MQIA_QMOPT_TRACE_SYSTEM = 169
+MQIA_QSG_DISP = 63
+MQIA_READ_AHEAD = 189
+MQIA_RECEIVE_TIMEOUT = 111
+MQIA_RECEIVE_TIMEOUT_MIN = 113
+MQIA_RECEIVE_TIMEOUT_TYPE = 112
+MQIA_REMOTE_EVENT = 50
+MQIA_RETENTION_INTERVAL = 21
+MQIA_SCOPE = 45
+MQIA_SECURITY_CASE = 141
+MQIA_SERVICE_CONTROL = 139
+MQIA_SERVICE_TYPE = 121
+MQIA_SHAREABILITY = 23
+MQIA_SHARED_Q_Q_MGR_NAME = 77
+MQIA_SSL_EVENT = 75
+MQIA_SSL_FIPS_REQUIRED = 92
+MQIA_SSL_RESET_COUNT = 76
+MQIA_SSL_TASKS = 69
+MQIA_START_STOP_EVENT = 52
+MQIA_STATISTICS_CHANNEL = 129
+MQIA_STATISTICS_AUTO_CLUSSDR = 130
+MQIA_STATISTICS_INTERVAL = 131
+MQIA_STATISTICS_MQI = 127
+MQIA_STATISTICS_Q = 128
+MQIA_SUB_COUNT = 204
+MQIA_SUB_SCOPE = 218
+MQIA_SYNCPOINT = 30
+MQIA_TCP_CHANNELS = 114
+MQIA_TCP_KEEP_ALIVE = 115
+MQIA_TCP_STACK_TYPE = 116
+MQIA_TIME_SINCE_RESET = 35
+MQIA_TOPIC_DEF_PERSISTENCE = 185
+MQIA_TOPIC_TYPE = 208
+MQIA_TRACE_ROUTE_RECORDING = 137
+MQIA_TREE_LIFE_TIME = 183
+MQIA_TRIGGER_CONTROL = 24
+MQIA_TRIGGER_DEPTH = 29
+MQIA_TRIGGER_INTERVAL = 25
+MQIA_TRIGGER_MSG_PRIORITY = 26
+MQIA_TRIGGER_TYPE = 28
+MQIA_TRIGGER_RESTART = 91
+MQIA_USAGE = 12
+MQIA_USER_LIST = 2000
+MQIA_WILDCARD_OPERATION = 216
+MQIAV_NOT_APPLICABLE = (-1)
+MQIAV_UNDEFINED = (-2)
+MQGA_FIRST = 8001
+MQGA_LAST = 9000
+MQOO_BIND_AS_Q_DEF = 0x00000000
+MQOO_READ_AHEAD_AS_Q_DEF = 0x00000000
+MQOO_INPUT_AS_Q_DEF = 0x00000001
+MQOO_INPUT_SHARED = 0x00000002
+MQOO_INPUT_EXCLUSIVE = 0x00000004
+MQOO_BROWSE = 0x00000008
+MQOO_OUTPUT = 0x00000010
+MQOO_INQUIRE = 0x00000020
+MQOO_SET = 0x00000040
+MQOO_SAVE_ALL_CONTEXT = 0x00000080
+MQOO_PASS_IDENTITY_CONTEXT = 0x00000100
+MQOO_PASS_ALL_CONTEXT = 0x00000200
+MQOO_SET_IDENTITY_CONTEXT = 0x00000400
+MQOO_SET_ALL_CONTEXT = 0x00000800
+MQOO_ALTERNATE_USER_AUTHORITY = 0x00001000
+MQOO_FAIL_IF_QUIESCING = 0x00002000
+MQOO_BIND_ON_OPEN = 0x00004000
+MQOO_BIND_NOT_FIXED = 0x00008000
+MQOO_CO_OP = 0x00020000
+MQOO_NO_READ_AHEAD = 0x00080000
+MQOO_READ_AHEAD = 0x00100000
+MQOO_RESOLVE_NAMES = 0x00010000
+MQOO_RESOLVE_LOCAL_Q = 0x00040000
+MQTYPE_AS_SET = 0x00000000
+MQTYPE_NULL = 0x00000002
+MQTYPE_BOOLEAN = 0x00000004
+MQTYPE_BYTE_STRING = 0x00000008
+MQTYPE_INT8 = 0x00000010
+MQTYPE_INT16 = 0x00000020
+MQTYPE_INT32 = 0x00000040
+MQTYPE_LONG = 0x00000040
+MQTYPE_INT64 = 0x00000080
+MQTYPE_FLOAT32 = 0x00000100
+MQTYPE_FLOAT64 = 0x00000200
+MQTYPE_STRING = 0x00000400
+MQVL_NULL_TERMINATED = (-1)
+MQVL_EMPTY_STRING = 0
+MQSTAT_TYPE_ASYNC_ERROR = 0x00000000
+MQSO_NONE = 0x00000000
+MQSO_NON_DURABLE = 0x00000000
+MQSO_READ_AHEAD_AS_Q_DEF = 0x00000000
+MQSO_ALTER = 0x00000001
+MQSO_CREATE = 0x00000002
+MQSO_RESUME = 0x00000004
+MQSO_DURABLE = 0x00000008
+MQSO_GROUP_SUB = 0x00000010
+MQSO_MANAGED = 0x00000020
+MQSO_SET_IDENTITY_CONTEXT = 0x00000040
+MQSO_FIXED_USERID = 0x00000100
+MQSO_ANY_USERID = 0x00000200
+MQSO_PUBLICATIONS_ON_REQUEST = 0x00000800
+MQSO_NEW_PUBLICATIONS_ONLY = 0x00001000
+MQSO_FAIL_IF_QUIESCING = 0x00002000
+MQSO_ALTERNATE_USER_AUTHORITY = 0x00040000
+MQSO_WILDCARD_CHAR = 0x00100000
+MQSO_WILDCARD_TOPIC = 0x00200000
+MQSO_SET_CORREL_ID = 0x00400000
+MQSO_SCOPE_QMGR = 0x04000000
+MQSO_NO_READ_AHEAD = 0x08000000
+MQSO_READ_AHEAD = 0x10000000
+MQSR_ACTION_PUBLICATION = 1
+MQHC_DEF_HCONN = 0
+MQHC_UNUSABLE_HCONN = (-1)
+MQHC_UNASSOCIATED_HCONN = (-3)
+MQ_ABEND_CODE_LENGTH = 4
+MQ_ACCOUNTING_TOKEN_LENGTH = 32
+MQ_APPL_IDENTITY_DATA_LENGTH = 32
+MQ_APPL_NAME_LENGTH = 28
+MQ_APPL_ORIGIN_DATA_LENGTH = 4
+MQ_APPL_TAG_LENGTH = 28
+MQ_ARM_SUFFIX_LENGTH = 2
+MQ_ATTENTION_ID_LENGTH = 4
+MQ_AUTH_INFO_CONN_NAME_LENGTH = 264
+MQ_AUTH_INFO_DESC_LENGTH = 64
+MQ_AUTH_INFO_NAME_LENGTH = 48
+MQ_AUTHENTICATOR_LENGTH = 8
+MQ_AUTO_REORG_CATALOG_LENGTH = 44
+MQ_AUTO_REORG_TIME_LENGTH = 4
+MQ_BATCH_INTERFACE_ID_LENGTH = 8
+MQ_BRIDGE_NAME_LENGTH = 24
+MQ_CANCEL_CODE_LENGTH = 4
+MQ_CF_STRUC_DESC_LENGTH = 64
+MQ_CF_STRUC_NAME_LENGTH = 12
+MQ_CHANNEL_DATE_LENGTH = 12
+MQ_CHANNEL_DESC_LENGTH = 64
+MQ_CHANNEL_NAME_LENGTH = 20
+MQ_CHANNEL_TIME_LENGTH = 8
+MQ_CHINIT_SERVICE_PARM_LENGTH = 32
+MQ_CICS_FILE_NAME_LENGTH = 8
+MQ_CLUSTER_NAME_LENGTH = 48
+MQ_CONN_NAME_LENGTH = 264
+MQ_CONN_TAG_LENGTH = 128
+MQ_CONNECTION_ID_LENGTH = 24
+MQ_CORREL_ID_LENGTH = 24
+MQ_CREATION_DATE_LENGTH = 12
+MQ_CREATION_TIME_LENGTH = 8
+MQ_DATE_LENGTH = 12
+MQ_DISTINGUISHED_NAME_LENGTH = 1024
+MQ_DNS_GROUP_NAME_LENGTH = 18
+MQ_EXIT_DATA_LENGTH = 32
+MQ_EXIT_INFO_NAME_LENGTH = 48
+MQ_EXIT_NAME_LENGTH = 128
+MQ_EXIT_PD_AREA_LENGTH = 48
+MQ_EXIT_USER_AREA_LENGTH = 16
+MQ_FACILITY_LENGTH = 8
+MQ_FACILITY_LIKE_LENGTH = 4
+MQ_FORMAT_LENGTH = 8
+MQ_FUNCTION_LENGTH = 4
+MQ_GROUP_ID_LENGTH = 24
+MQ_LDAP_PASSWORD_LENGTH = 32
+MQ_LISTENER_NAME_LENGTH = 48
+MQ_LISTENER_DESC_LENGTH = 64
+MQ_LOCAL_ADDRESS_LENGTH = 48
+MQ_LTERM_OVERRIDE_LENGTH = 8
+MQ_LU_NAME_LENGTH = 8
+MQ_LUWID_LENGTH = 16
+MQ_MAX_EXIT_NAME_LENGTH = 128
+MQ_MAX_MCA_USER_ID_LENGTH = 64
+MQ_MAX_PROPERTY_NAME_LENGTH = 4095
+MQ_MAX_USER_ID_LENGTH = 64
+MQ_MCA_JOB_NAME_LENGTH = 28
+MQ_MCA_NAME_LENGTH = 20
+MQ_MCA_USER_DATA_LENGTH = 32
+MQ_MCA_USER_ID_LENGTH = 12
+MQ_MFS_MAP_NAME_LENGTH = 8
+MQ_MODE_NAME_LENGTH = 8
+MQ_MSG_HEADER_LENGTH = 4000
+MQ_MSG_ID_LENGTH = 24
+MQ_MSG_TOKEN_LENGTH = 16
+MQ_NAMELIST_DESC_LENGTH = 64
+MQ_NAMELIST_NAME_LENGTH = 48
+MQ_OBJECT_INSTANCE_ID_LENGTH = 24
+MQ_OBJECT_NAME_LENGTH = 48
+MQ_PASS_TICKET_APPL_LENGTH = 8
+MQ_PASSWORD_LENGTH = 12
+MQ_PROCESS_APPL_ID_LENGTH = 256
+MQ_PROCESS_DESC_LENGTH = 64
+MQ_PROCESS_ENV_DATA_LENGTH = 128
+MQ_PROCESS_NAME_LENGTH = 48
+MQ_PROCESS_USER_DATA_LENGTH = 128
+MQ_PROGRAM_NAME_LENGTH = 20
+MQ_PUT_APPL_NAME_LENGTH = 28
+MQ_PUT_DATE_LENGTH = 8
+MQ_PUT_TIME_LENGTH = 8
+MQ_Q_DESC_LENGTH = 64
+MQ_Q_MGR_DESC_LENGTH = 64
+MQ_Q_MGR_IDENTIFIER_LENGTH = 48
+MQ_Q_MGR_NAME_LENGTH = 48
+MQ_Q_NAME_LENGTH = 48
+MQ_QSG_NAME_LENGTH = 4
+MQ_REMOTE_SYS_ID_LENGTH = 4
+MQ_SECURITY_ID_LENGTH = 40
+MQ_SELECTOR_LENGTH = 10240
+MQ_SERVICE_ARGS_LENGTH = 255
+MQ_SERVICE_COMMAND_LENGTH = 255
+MQ_SERVICE_DESC_LENGTH = 64
+MQ_SERVICE_NAME_LENGTH = 32
+MQ_SERVICE_PATH_LENGTH = 255
+MQ_SERVICE_STEP_LENGTH = 8
+MQ_SHORT_CONN_NAME_LENGTH = 20
+MQ_SHORT_DNAME_LENGTH = 256
+MQ_SSL_CIPHER_SPEC_LENGTH = 32
+MQ_SSL_CRYPTO_HARDWARE_LENGTH = 256
+MQ_SSL_HANDSHAKE_STAGE_LENGTH = 32
+MQ_SSL_KEY_LIBRARY_LENGTH = 44
+MQ_SSL_KEY_MEMBER_LENGTH = 8
+MQ_SSL_KEY_REPOSITORY_LENGTH = 256
+MQ_SSL_PEER_NAME_LENGTH = 1024
+MQ_SSL_SHORT_PEER_NAME_LENGTH = 256
+MQ_START_CODE_LENGTH = 4
+MQ_STORAGE_CLASS_DESC_LENGTH = 64
+MQ_STORAGE_CLASS_LENGTH = 8
+MQ_SUB_IDENTITY_LENGTH = 128
+MQ_SUB_POINT_LENGTH = 128
+MQ_TCP_NAME_LENGTH = 8
+MQ_TIME_LENGTH = 8
+MQ_TOPIC_DESC_LENGTH = 64
+MQ_TOPIC_NAME_LENGTH = 48
+MQ_TOPIC_STR_LENGTH = 10240
+MQ_TOTAL_EXIT_DATA_LENGTH = 999
+MQ_TOTAL_EXIT_NAME_LENGTH = 999
+MQ_TP_NAME_LENGTH = 64
+MQ_TPIPE_NAME_LENGTH = 8
+MQ_TRAN_INSTANCE_ID_LENGTH = 16
+MQ_TRANSACTION_ID_LENGTH = 4
+MQ_TRIGGER_DATA_LENGTH = 64
+MQ_TRIGGER_PROGRAM_NAME_LENGTH = 8
+MQ_TRIGGER_TERM_ID_LENGTH = 4
+MQ_TRIGGER_TRANS_ID_LENGTH = 4
+MQ_USER_ID_LENGTH = 12
+MQ_XCF_GROUP_NAME_LENGTH = 8
+MQ_XCF_MEMBER_NAME_LENGTH = 16
+MQCC_OK = 0
+MQCC_WARNING = 1
+MQCC_FAILED = 2
+MQCC_UNKNOWN = (-1)
+MQRC_NONE = 0
+MQRC_APPL_FIRST = 900
+MQRC_APPL_LAST = 999
+MQRC_ALIAS_BASE_Q_TYPE_ERROR = 2001
+MQRC_ALREADY_CONNECTED = 2002
+MQRC_BACKED_OUT = 2003
+MQRC_BUFFER_ERROR = 2004
+MQRC_BUFFER_LENGTH_ERROR = 2005
+MQRC_CHAR_ATTR_LENGTH_ERROR = 2006
+MQRC_CHAR_ATTRS_ERROR = 2007
+MQRC_CHAR_ATTRS_TOO_SHORT = 2008
+MQRC_CONNECTION_BROKEN = 2009
+MQRC_DATA_LENGTH_ERROR = 2010
+MQRC_DYNAMIC_Q_NAME_ERROR = 2011
+MQRC_ENVIRONMENT_ERROR = 2012
+MQRC_EXPIRY_ERROR = 2013
+MQRC_FEEDBACK_ERROR = 2014
+MQRC_GET_INHIBITED = 2016
+MQRC_HANDLE_NOT_AVAILABLE = 2017
+MQRC_HCONN_ERROR = 2018
+MQRC_HOBJ_ERROR = 2019
+MQRC_INHIBIT_VALUE_ERROR = 2020
+MQRC_INT_ATTR_COUNT_ERROR = 2021
+MQRC_INT_ATTR_COUNT_TOO_SMALL = 2022
+MQRC_INT_ATTRS_ARRAY_ERROR = 2023
+MQRC_SYNCPOINT_LIMIT_REACHED = 2024
+MQRC_MAX_CONNS_LIMIT_REACHED = 2025
+MQRC_MD_ERROR = 2026
+MQRC_MISSING_REPLY_TO_Q = 2027
+MQRC_MSG_TYPE_ERROR = 2029
+MQRC_MSG_TOO_BIG_FOR_Q = 2030
+MQRC_MSG_TOO_BIG_FOR_Q_MGR = 2031
+MQRC_NO_MSG_AVAILABLE = 2033
+MQRC_NO_MSG_UNDER_CURSOR = 2034
+MQRC_NOT_AUTHORIZED = 2035
+MQRC_NOT_OPEN_FOR_BROWSE = 2036
+MQRC_NOT_OPEN_FOR_INPUT = 2037
+MQRC_NOT_OPEN_FOR_INQUIRE = 2038
+MQRC_NOT_OPEN_FOR_OUTPUT = 2039
+MQRC_NOT_OPEN_FOR_SET = 2040
+MQRC_OBJECT_CHANGED = 2041
+MQRC_OBJECT_IN_USE = 2042
+MQRC_OBJECT_TYPE_ERROR = 2043
+MQRC_OD_ERROR = 2044
+MQRC_OPTION_NOT_VALID_FOR_TYPE = 2045
+MQRC_OPTIONS_ERROR = 2046
+MQRC_PERSISTENCE_ERROR = 2047
+MQRC_PERSISTENT_NOT_ALLOWED = 2048
+MQRC_PRIORITY_EXCEEDS_MAXIMUM = 2049
+MQRC_PRIORITY_ERROR = 2050
+MQRC_PUT_INHIBITED = 2051
+MQRC_Q_DELETED = 2052
+MQRC_Q_FULL = 2053
+MQRC_Q_NOT_EMPTY = 2055
+MQRC_Q_SPACE_NOT_AVAILABLE = 2056
+MQRC_Q_TYPE_ERROR = 2057
+MQRC_Q_MGR_NAME_ERROR = 2058
+MQRC_Q_MGR_NOT_AVAILABLE = 2059
+MQRC_REPORT_OPTIONS_ERROR = 2061
+MQRC_SECOND_MARK_NOT_ALLOWED = 2062
+MQRC_SECURITY_ERROR = 2063
+MQRC_SELECTOR_COUNT_ERROR = 2065
+MQRC_SELECTOR_LIMIT_EXCEEDED = 2066
+MQRC_SELECTOR_ERROR = 2067
+MQRC_SELECTOR_NOT_FOR_TYPE = 2068
+MQRC_SIGNAL_OUTSTANDING = 2069
+MQRC_SIGNAL_REQUEST_ACCEPTED = 2070
+MQRC_STORAGE_NOT_AVAILABLE = 2071
+MQRC_SYNCPOINT_NOT_AVAILABLE = 2072
+MQRC_TRIGGER_CONTROL_ERROR = 2075
+MQRC_TRIGGER_DEPTH_ERROR = 2076
+MQRC_TRIGGER_MSG_PRIORITY_ERR = 2077
+MQRC_TRIGGER_TYPE_ERROR = 2078
+MQRC_TRUNCATED_MSG_ACCEPTED = 2079
+MQRC_TRUNCATED_MSG_FAILED = 2080
+MQRC_UNKNOWN_ALIAS_BASE_Q = 2082
+MQRC_UNKNOWN_OBJECT_NAME = 2085
+MQRC_UNKNOWN_OBJECT_Q_MGR = 2086
+MQRC_UNKNOWN_REMOTE_Q_MGR = 2087
+MQRC_WAIT_INTERVAL_ERROR = 2090
+MQRC_XMIT_Q_TYPE_ERROR = 2091
+MQRC_XMIT_Q_USAGE_ERROR = 2092
+MQRC_NOT_OPEN_FOR_PASS_ALL = 2093
+MQRC_NOT_OPEN_FOR_PASS_IDENT = 2094
+MQRC_NOT_OPEN_FOR_SET_ALL = 2095
+MQRC_NOT_OPEN_FOR_SET_IDENT = 2096
+MQRC_CONTEXT_HANDLE_ERROR = 2097
+MQRC_CONTEXT_NOT_AVAILABLE = 2098
+MQRC_SIGNAL1_ERROR = 2099
+MQRC_OBJECT_ALREADY_EXISTS = 2100
+MQRC_OBJECT_DAMAGED = 2101
+MQRC_RESOURCE_PROBLEM = 2102
+MQRC_ANOTHER_Q_MGR_CONNECTED = 2103
+MQRC_UNKNOWN_REPORT_OPTION = 2104
+MQRC_STORAGE_CLASS_ERROR = 2105
+MQRC_COD_NOT_VALID_FOR_XCF_Q = 2106
+MQRC_XWAIT_CANCELED = 2107
+MQRC_XWAIT_ERROR = 2108
+MQRC_SUPPRESSED_BY_EXIT = 2109
+MQRC_FORMAT_ERROR = 2110
+MQRC_SOURCE_CCSID_ERROR = 2111
+MQRC_SOURCE_INTEGER_ENC_ERROR = 2112
+MQRC_SOURCE_DECIMAL_ENC_ERROR = 2113
+MQRC_SOURCE_FLOAT_ENC_ERROR = 2114
+MQRC_TARGET_CCSID_ERROR = 2115
+MQRC_TARGET_INTEGER_ENC_ERROR = 2116
+MQRC_TARGET_DECIMAL_ENC_ERROR = 2117
+MQRC_TARGET_FLOAT_ENC_ERROR = 2118
+MQRC_NOT_CONVERTED = 2119
+MQRC_CONVERTED_MSG_TOO_BIG = 2120
+MQRC_TRUNCATED = 2120
+MQRC_NO_EXTERNAL_PARTICIPANTS = 2121
+MQRC_PARTICIPANT_NOT_AVAILABLE = 2122
+MQRC_OUTCOME_MIXED = 2123
+MQRC_OUTCOME_PENDING = 2124
+MQRC_BRIDGE_STARTED = 2125
+MQRC_BRIDGE_STOPPED = 2126
+MQRC_ADAPTER_STORAGE_SHORTAGE = 2127
+MQRC_UOW_IN_PROGRESS = 2128
+MQRC_ADAPTER_CONN_LOAD_ERROR = 2129
+MQRC_ADAPTER_SERV_LOAD_ERROR = 2130
+MQRC_ADAPTER_DEFS_ERROR = 2131
+MQRC_ADAPTER_DEFS_LOAD_ERROR = 2132
+MQRC_ADAPTER_CONV_LOAD_ERROR = 2133
+MQRC_BO_ERROR = 2134
+MQRC_DH_ERROR = 2135
+MQRC_MULTIPLE_REASONS = 2136
+MQRC_OPEN_FAILED = 2137
+MQRC_ADAPTER_DISC_LOAD_ERROR = 2138
+MQRC_CNO_ERROR = 2139
+MQRC_CICS_WAIT_FAILED = 2140
+MQRC_DLH_ERROR = 2141
+MQRC_HEADER_ERROR = 2142
+MQRC_SOURCE_LENGTH_ERROR = 2143
+MQRC_TARGET_LENGTH_ERROR = 2144
+MQRC_SOURCE_BUFFER_ERROR = 2145
+MQRC_TARGET_BUFFER_ERROR = 2146
+MQRC_IIH_ERROR = 2148
+MQRC_PCF_ERROR = 2149
+MQRC_DBCS_ERROR = 2150
+MQRC_OBJECT_NAME_ERROR = 2152
+MQRC_OBJECT_Q_MGR_NAME_ERROR = 2153
+MQRC_RECS_PRESENT_ERROR = 2154
+MQRC_OBJECT_RECORDS_ERROR = 2155
+MQRC_RESPONSE_RECORDS_ERROR = 2156
+MQRC_ASID_MISMATCH = 2157
+MQRC_PMO_RECORD_FLAGS_ERROR = 2158
+MQRC_PUT_MSG_RECORDS_ERROR = 2159
+MQRC_CONN_ID_IN_USE = 2160
+MQRC_Q_MGR_QUIESCING = 2161
+MQRC_Q_MGR_STOPPING = 2162
+MQRC_DUPLICATE_RECOV_COORD = 2163
+MQRC_PMO_ERROR = 2173
+MQRC_API_EXIT_NOT_FOUND = 2182
+MQRC_API_EXIT_LOAD_ERROR = 2183
+MQRC_REMOTE_Q_NAME_ERROR = 2184
+MQRC_INCONSISTENT_PERSISTENCE = 2185
+MQRC_GMO_ERROR = 2186
+MQRC_CICS_BRIDGE_RESTRICTION = 2187
+MQRC_STOPPED_BY_CLUSTER_EXIT = 2188
+MQRC_CLUSTER_RESOLUTION_ERROR = 2189
+MQRC_CONVERTED_STRING_TOO_BIG = 2190
+MQRC_TMC_ERROR = 2191
+MQRC_PAGESET_FULL = 2192
+MQRC_STORAGE_MEDIUM_FULL = 2192
+MQRC_PAGESET_ERROR = 2193
+MQRC_NAME_NOT_VALID_FOR_TYPE = 2194
+MQRC_UNEXPECTED_ERROR = 2195
+MQRC_UNKNOWN_XMIT_Q = 2196
+MQRC_UNKNOWN_DEF_XMIT_Q = 2197
+MQRC_DEF_XMIT_Q_TYPE_ERROR = 2198
+MQRC_DEF_XMIT_Q_USAGE_ERROR = 2199
+MQRC_MSG_MARKED_BROWSE_CO_OP = 2200
+MQRC_NAME_IN_USE = 2201
+MQRC_CONNECTION_QUIESCING = 2202
+MQRC_CONNECTION_STOPPING = 2203
+MQRC_ADAPTER_NOT_AVAILABLE = 2204
+MQRC_MSG_ID_ERROR = 2206
+MQRC_CORREL_ID_ERROR = 2207
+MQRC_FILE_SYSTEM_ERROR = 2208
+MQRC_NO_MSG_LOCKED = 2209
+MQRC_SOAP_DOTNET_ERROR = 2210
+MQRC_SOAP_AXIS_ERROR = 2211
+MQRC_SOAP_URL_ERROR = 2212
+MQRC_FILE_NOT_AUDITED = 2216
+MQRC_CONNECTION_NOT_AUTHORIZED = 2217
+MQRC_MSG_TOO_BIG_FOR_CHANNEL = 2218
+MQRC_CALL_IN_PROGRESS = 2219
+MQRC_RMH_ERROR = 2220
+MQRC_Q_MGR_ACTIVE = 2222
+MQRC_Q_MGR_NOT_ACTIVE = 2223
+MQRC_Q_DEPTH_HIGH = 2224
+MQRC_Q_DEPTH_LOW = 2225
+MQRC_Q_SERVICE_INTERVAL_HIGH = 2226
+MQRC_Q_SERVICE_INTERVAL_OK = 2227
+MQRC_RFH_HEADER_FIELD_ERROR = 2228
+MQRC_RAS_PROPERTY_ERROR = 2229
+MQRC_UNIT_OF_WORK_NOT_STARTED = 2232
+MQRC_CHANNEL_AUTO_DEF_OK = 2233
+MQRC_CHANNEL_AUTO_DEF_ERROR = 2234
+MQRC_CFH_ERROR = 2235
+MQRC_CFIL_ERROR = 2236
+MQRC_CFIN_ERROR = 2237
+MQRC_CFSL_ERROR = 2238
+MQRC_CFST_ERROR = 2239
+MQRC_INCOMPLETE_GROUP = 2241
+MQRC_INCOMPLETE_MSG = 2242
+MQRC_INCONSISTENT_CCSIDS = 2243
+MQRC_INCONSISTENT_ENCODINGS = 2244
+MQRC_INCONSISTENT_UOW = 2245
+MQRC_INVALID_MSG_UNDER_CURSOR = 2246
+MQRC_MATCH_OPTIONS_ERROR = 2247
+MQRC_MDE_ERROR = 2248
+MQRC_MSG_FLAGS_ERROR = 2249
+MQRC_MSG_SEQ_NUMBER_ERROR = 2250
+MQRC_OFFSET_ERROR = 2251
+MQRC_ORIGINAL_LENGTH_ERROR = 2252
+MQRC_SEGMENT_LENGTH_ZERO = 2253
+MQRC_UOW_NOT_AVAILABLE = 2255
+MQRC_WRONG_GMO_VERSION = 2256
+MQRC_WRONG_MD_VERSION = 2257
+MQRC_GROUP_ID_ERROR = 2258
+MQRC_INCONSISTENT_BROWSE = 2259
+MQRC_XQH_ERROR = 2260
+MQRC_SRC_ENV_ERROR = 2261
+MQRC_SRC_NAME_ERROR = 2262
+MQRC_DEST_ENV_ERROR = 2263
+MQRC_DEST_NAME_ERROR = 2264
+MQRC_TM_ERROR = 2265
+MQRC_CLUSTER_EXIT_ERROR = 2266
+MQRC_CLUSTER_EXIT_LOAD_ERROR = 2267
+MQRC_CLUSTER_PUT_INHIBITED = 2268
+MQRC_CLUSTER_RESOURCE_ERROR = 2269
+MQRC_NO_DESTINATIONS_AVAILABLE = 2270
+MQRC_CONN_TAG_IN_USE = 2271
+MQRC_PARTIALLY_CONVERTED = 2272
+MQRC_CONNECTION_ERROR = 2273
+MQRC_OPTION_ENVIRONMENT_ERROR = 2274
+MQRC_CD_ERROR = 2277
+MQRC_CLIENT_CONN_ERROR = 2278
+MQRC_CHANNEL_STOPPED_BY_USER = 2279
+MQRC_HCONFIG_ERROR = 2280
+MQRC_FUNCTION_ERROR = 2281
+MQRC_CHANNEL_STARTED = 2282
+MQRC_CHANNEL_STOPPED = 2283
+MQRC_CHANNEL_CONV_ERROR = 2284
+MQRC_SERVICE_NOT_AVAILABLE = 2285
+MQRC_INITIALIZATION_FAILED = 2286
+MQRC_TERMINATION_FAILED = 2287
+MQRC_UNKNOWN_Q_NAME = 2288
+MQRC_SERVICE_ERROR = 2289
+MQRC_Q_ALREADY_EXISTS = 2290
+MQRC_USER_ID_NOT_AVAILABLE = 2291
+MQRC_UNKNOWN_ENTITY = 2292
+MQRC_UNKNOWN_AUTH_ENTITY = 2293
+MQRC_UNKNOWN_REF_OBJECT = 2294
+MQRC_CHANNEL_ACTIVATED = 2295
+MQRC_CHANNEL_NOT_ACTIVATED = 2296
+MQRC_UOW_CANCELED = 2297
+MQRC_FUNCTION_NOT_SUPPORTED = 2298
+MQRC_SELECTOR_TYPE_ERROR = 2299
+MQRC_COMMAND_TYPE_ERROR = 2300
+MQRC_MULTIPLE_INSTANCE_ERROR = 2301
+MQRC_SYSTEM_ITEM_NOT_ALTERABLE = 2302
+MQRC_BAG_CONVERSION_ERROR = 2303
+MQRC_SELECTOR_OUT_OF_RANGE = 2304
+MQRC_SELECTOR_NOT_UNIQUE = 2305
+MQRC_INDEX_NOT_PRESENT = 2306
+MQRC_STRING_ERROR = 2307
+MQRC_ENCODING_NOT_SUPPORTED = 2308
+MQRC_SELECTOR_NOT_PRESENT = 2309
+MQRC_OUT_SELECTOR_ERROR = 2310
+MQRC_STRING_TRUNCATED = 2311
+MQRC_SELECTOR_WRONG_TYPE = 2312
+MQRC_INCONSISTENT_ITEM_TYPE = 2313
+MQRC_INDEX_ERROR = 2314
+MQRC_SYSTEM_BAG_NOT_ALTERABLE = 2315
+MQRC_ITEM_COUNT_ERROR = 2316
+MQRC_FORMAT_NOT_SUPPORTED = 2317
+MQRC_SELECTOR_NOT_SUPPORTED = 2318
+MQRC_ITEM_VALUE_ERROR = 2319
+MQRC_HBAG_ERROR = 2320
+MQRC_PARAMETER_MISSING = 2321
+MQRC_CMD_SERVER_NOT_AVAILABLE = 2322
+MQRC_STRING_LENGTH_ERROR = 2323
+MQRC_INQUIRY_COMMAND_ERROR = 2324
+MQRC_NESTED_BAG_NOT_SUPPORTED = 2325
+MQRC_BAG_WRONG_TYPE = 2326
+MQRC_ITEM_TYPE_ERROR = 2327
+MQRC_SYSTEM_BAG_NOT_DELETABLE = 2328
+MQRC_SYSTEM_ITEM_NOT_DELETABLE = 2329
+MQRC_CODED_CHAR_SET_ID_ERROR = 2330
+MQRC_MSG_TOKEN_ERROR = 2331
+MQRC_MISSING_WIH = 2332
+MQRC_WIH_ERROR = 2333
+MQRC_RFH_ERROR = 2334
+MQRC_RFH_STRING_ERROR = 2335
+MQRC_RFH_COMMAND_ERROR = 2336
+MQRC_RFH_PARM_ERROR = 2337
+MQRC_RFH_DUPLICATE_PARM = 2338
+MQRC_RFH_PARM_MISSING = 2339
+MQRC_CHAR_CONVERSION_ERROR = 2340
+MQRC_UCS2_CONVERSION_ERROR = 2341
+MQRC_DB2_NOT_AVAILABLE = 2342
+MQRC_OBJECT_NOT_UNIQUE = 2343
+MQRC_CONN_TAG_NOT_RELEASED = 2344
+MQRC_CF_NOT_AVAILABLE = 2345
+MQRC_CF_STRUC_IN_USE = 2346
+MQRC_CF_STRUC_LIST_HDR_IN_USE = 2347
+MQRC_CF_STRUC_AUTH_FAILED = 2348
+MQRC_CF_STRUC_ERROR = 2349
+MQRC_CONN_TAG_NOT_USABLE = 2350
+MQRC_GLOBAL_UOW_CONFLICT = 2351
+MQRC_LOCAL_UOW_CONFLICT = 2352
+MQRC_HANDLE_IN_USE_FOR_UOW = 2353
+MQRC_UOW_ENLISTMENT_ERROR = 2354
+MQRC_UOW_MIX_NOT_SUPPORTED = 2355
+MQRC_WXP_ERROR = 2356
+MQRC_CURRENT_RECORD_ERROR = 2357
+MQRC_NEXT_OFFSET_ERROR = 2358
+MQRC_NO_RECORD_AVAILABLE = 2359
+MQRC_OBJECT_LEVEL_INCOMPATIBLE = 2360
+MQRC_NEXT_RECORD_ERROR = 2361
+MQRC_BACKOUT_THRESHOLD_REACHED = 2362
+MQRC_MSG_NOT_MATCHED = 2363
+MQRC_JMS_FORMAT_ERROR = 2364
+MQRC_SEGMENTS_NOT_SUPPORTED = 2365
+MQRC_WRONG_CF_LEVEL = 2366
+MQRC_CONFIG_CREATE_OBJECT = 2367
+MQRC_CONFIG_CHANGE_OBJECT = 2368
+MQRC_CONFIG_DELETE_OBJECT = 2369
+MQRC_CONFIG_REFRESH_OBJECT = 2370
+MQRC_CHANNEL_SSL_ERROR = 2371
+MQRC_PARTICIPANT_NOT_DEFINED = 2372
+MQRC_CF_STRUC_FAILED = 2373
+MQRC_API_EXIT_ERROR = 2374
+MQRC_API_EXIT_INIT_ERROR = 2375
+MQRC_API_EXIT_TERM_ERROR = 2376
+MQRC_EXIT_REASON_ERROR = 2377
+MQRC_RESERVED_VALUE_ERROR = 2378
+MQRC_NO_DATA_AVAILABLE = 2379
+MQRC_SCO_ERROR = 2380
+MQRC_KEY_REPOSITORY_ERROR = 2381
+MQRC_CRYPTO_HARDWARE_ERROR = 2382
+MQRC_AUTH_INFO_REC_COUNT_ERROR = 2383
+MQRC_AUTH_INFO_REC_ERROR = 2384
+MQRC_AIR_ERROR = 2385
+MQRC_AUTH_INFO_TYPE_ERROR = 2386
+MQRC_AUTH_INFO_CONN_NAME_ERROR = 2387
+MQRC_LDAP_USER_NAME_ERROR = 2388
+MQRC_LDAP_USER_NAME_LENGTH_ERR = 2389
+MQRC_LDAP_PASSWORD_ERROR = 2390
+MQRC_SSL_ALREADY_INITIALIZED = 2391
+MQRC_SSL_CONFIG_ERROR = 2392
+MQRC_SSL_INITIALIZATION_ERROR = 2393
+MQRC_Q_INDEX_TYPE_ERROR = 2394
+MQRC_CFBS_ERROR = 2395
+MQRC_SSL_NOT_ALLOWED = 2396
+MQRC_JSSE_ERROR = 2397
+MQRC_SSL_PEER_NAME_MISMATCH = 2398
+MQRC_SSL_PEER_NAME_ERROR = 2399
+MQRC_UNSUPPORTED_CIPHER_SUITE = 2400
+MQRC_SSL_CERTIFICATE_REVOKED = 2401
+MQRC_SSL_CERT_STORE_ERROR = 2402
+MQRC_CLIENT_EXIT_LOAD_ERROR = 2406
+MQRC_CLIENT_EXIT_ERROR = 2407
+MQRC_UOW_COMMITTED = 2408
+MQRC_SSL_KEY_RESET_ERROR = 2409
+MQRC_UNKNOWN_COMPONENT_NAME = 2410
+MQRC_LOGGER_STATUS = 2411
+MQRC_COMMAND_MQSC = 2412
+MQRC_COMMAND_PCF = 2413
+MQRC_CFIF_ERROR = 2414
+MQRC_CFSF_ERROR = 2415
+MQRC_CFGR_ERROR = 2416
+MQRC_MSG_NOT_ALLOWED_IN_GROUP = 2417
+MQRC_FILTER_OPERATOR_ERROR = 2418
+MQRC_NESTED_SELECTOR_ERROR = 2419
+MQRC_EPH_ERROR = 2420
+MQRC_RFH_FORMAT_ERROR = 2421
+MQRC_CFBF_ERROR = 2422
+MQRC_CLIENT_CHANNEL_CONFLICT = 2423
+MQRC_SD_ERROR = 2424
+MQRC_TOPIC_STRING_ERROR = 2425
+MQRC_STS_ERROR = 2426
+MQRC_NO_SUBSCRIPTION = 2428
+MQRC_SUBSCRIPTION_IN_USE = 2429
+MQRC_STAT_TYPE_ERROR = 2430
+MQRC_SUB_USER_DATA_ERROR = 2431
+MQRC_SUB_ALREADY_EXISTS = 2432
+MQRC_IDENTITY_MISMATCH = 2434
+MQRC_ALTER_SUB_ERROR = 2435
+MQRC_DURABILITY_NOT_ALLOWED = 2436
+MQRC_NO_RETAINED_MSG = 2437
+MQRC_SRO_ERROR = 2438
+MQRC_SUB_NAME_ERROR = 2440
+MQRC_OBJECT_STRING_ERROR = 2441
+MQRC_PROPERTY_NAME_ERROR = 2442
+MQRC_SEGMENTATION_NOT_ALLOWED = 2443
+MQRC_CBD_ERROR = 2444
+MQRC_CTLO_ERROR = 2445
+MQRC_NO_CALLBACKS_ACTIVE = 2446
+MQRC_CALLBACK_NOT_REGISTERED = 2448
+MQRC_OPTIONS_CHANGED = 2457
+MQRC_READ_AHEAD_MSGS = 2458
+MQRC_SELECTOR_SYNTAX_ERROR = 2459
+MQRC_HMSG_ERROR = 2460
+MQRC_CMHO_ERROR = 2461
+MQRC_DMHO_ERROR = 2462
+MQRC_SMPO_ERROR = 2463
+MQRC_IMPO_ERROR = 2464
+MQRC_PROPERTY_NAME_TOO_BIG = 2465
+MQRC_PROP_VALUE_NOT_CONVERTED = 2466
+MQRC_PROP_TYPE_NOT_SUPPORTED = 2467
+MQRC_PROPERTY_VALUE_TOO_BIG = 2469
+MQRC_PROP_CONV_NOT_SUPPORTED = 2470
+MQRC_PROPERTY_NOT_AVAILABLE = 2471
+MQRC_PROP_NUMBER_FORMAT_ERROR = 2472
+MQRC_PROPERTY_TYPE_ERROR = 2473
+MQRC_PROPERTIES_TOO_BIG = 2478
+MQRC_PUT_NOT_RETAINED = 2479
+MQRC_ALIAS_TARGTYPE_CHANGED = 2480
+MQRC_DMPO_ERROR = 2481
+MQRC_PD_ERROR = 2482
+MQRC_CALLBACK_TYPE_ERROR = 2483
+MQRC_CBD_OPTIONS_ERROR = 2484
+MQRC_MAX_MSG_LENGTH_ERROR = 2485
+MQRC_CALLBACK_ROUTINE_ERROR = 2486
+MQRC_CALLBACK_LINK_ERROR = 2487
+MQRC_OPERATION_ERROR = 2488
+MQRC_BMHO_ERROR = 2489
+MQRC_UNSUPPORTED_PROPERTY = 2490
+MQRC_PROP_NAME_NOT_CONVERTED = 2492
+MQRC_GET_ENABLED = 2494
+MQRC_MODULE_NOT_FOUND = 2495
+MQRC_MODULE_INVALID = 2496
+MQRC_MODULE_ENTRY_NOT_FOUND = 2497
+MQRC_MIXED_CONTENT_NOT_ALLOWED = 2498
+MQRC_MSG_HANDLE_IN_USE = 2499
+MQRC_HCONN_ASYNC_ACTIVE = 2500
+MQRC_MHBO_ERROR = 2501
+MQRC_PUBLICATION_FAILURE = 2502
+MQRC_SUB_INHIBITED = 2503
+MQRC_SELECTOR_ALWAYS_FALSE = 2504
+MQRC_XEPO_ERROR = 2507
+MQRC_DURABILITY_NOT_ALTERABLE = 2509
+MQRC_TOPIC_NOT_ALTERABLE = 2510
+MQRC_SUBLEVEL_NOT_ALTERABLE = 2512
+MQRC_PROPERTY_NAME_LENGTH_ERR = 2513
+MQRC_DUPLICATE_GROUP_SUB = 2514
+MQRC_GROUPING_NOT_ALTERABLE = 2515
+MQRC_SELECTOR_INVALID_FOR_TYPE = 2516
+MQRC_HOBJ_QUIESCED = 2517
+MQRC_HOBJ_QUIESCED_NO_MSGS = 2518
+MQRC_SELECTION_STRING_ERROR = 2519
+MQRC_RES_OBJECT_STRING_ERROR = 2520
+MQRC_CONNECTION_SUSPENDED = 2521
+MQRC_INVALID_DESTINATION = 2522
+MQRC_INVALID_SUBSCRIPTION = 2523
+MQRC_SELECTOR_NOT_ALTERABLE = 2524
+MQRC_RETAINED_MSG_Q_ERROR = 2525
+MQRC_RETAINED_NOT_DELIVERED = 2526
+MQRC_RFH_RESTRICTED_FORMAT_ERR = 2527
+MQRC_CONNECTION_STOPPED = 2528
+MQRC_ASYNC_UOW_CONFLICT = 2529
+MQRC_ASYNC_XA_CONFLICT = 2530
+MQRC_PUBSUB_INHIBITED = 2531
+MQRC_MSG_HANDLE_COPY_FAILURE = 2532
+MQRC_DEST_CLASS_NOT_ALTERABLE = 2533
+MQRC_OPERATION_NOT_ALLOWED = 2534
+MQRC_ACTION_ERROR = 2535
+MQRC_CHANNEL_NOT_AVAILABLE = 2537
+MQRC_HOST_NOT_AVAILABLE = 2538
+MQRC_CHANNEL_CONFIG_ERROR = 2539
+MQRC_UNKNOWN_CHANNEL_NAME = 2540
+MQRC_LOOPING_PUBLICATION = 2541
+MQRC_ALREADY_JOINED = 2542
+MQRC_REOPEN_EXCL_INPUT_ERROR = 6100
+MQRC_REOPEN_INQUIRE_ERROR = 6101
+MQRC_REOPEN_SAVED_CONTEXT_ERR = 6102
+MQRC_REOPEN_TEMPORARY_Q_ERROR = 6103
+MQRC_ATTRIBUTE_LOCKED = 6104
+MQRC_CURSOR_NOT_VALID = 6105
+MQRC_ENCODING_ERROR = 6106
+MQRC_STRUC_ID_ERROR = 6107
+MQRC_NULL_POINTER = 6108
+MQRC_NO_CONNECTION_REFERENCE = 6109
+MQRC_NO_BUFFER = 6110
+MQRC_BINARY_DATA_LENGTH_ERROR = 6111
+MQRC_BUFFER_NOT_AUTOMATIC = 6112
+MQRC_INSUFFICIENT_BUFFER = 6113
+MQRC_INSUFFICIENT_DATA = 6114
+MQRC_DATA_TRUNCATED = 6115
+MQRC_ZERO_LENGTH = 6116
+MQRC_NEGATIVE_LENGTH = 6117
+MQRC_NEGATIVE_OFFSET = 6118
+MQRC_INCONSISTENT_FORMAT = 6119
+MQRC_INCONSISTENT_OBJECT_STATE = 6120
+MQRC_CONTEXT_OBJECT_NOT_VALID = 6121
+MQRC_CONTEXT_OPEN_ERROR = 6122
+MQRC_STRUC_LENGTH_ERROR = 6123
+MQRC_NOT_CONNECTED = 6124
+MQRC_NOT_OPEN = 6125
+MQRC_DISTRIBUTION_LIST_EMPTY = 6126
+MQRC_INCONSISTENT_OPEN_OPTIONS = 6127
+MQRC_WRONG_VERSION = 6128
+MQRC_REFERENCE_ERROR = 6129
+MQQT_LOCAL = 1
+MQQT_MODEL = 2
+MQQT_ALIAS = 3
+MQQT_REMOTE = 6
+MQQT_CLUSTER = 7
+MQCQT_LOCAL_Q = 1
+MQCQT_ALIAS_Q = 2
+MQCQT_REMOTE_Q = 3
+MQCQT_Q_MGR_ALIAS = 4
+MQQT_ALL = 1001
+MQQDT_PREDEFINED = 1
+MQQDT_PERMANENT_DYNAMIC = 2
+MQQDT_TEMPORARY_DYNAMIC = 3
+MQQDT_SHARED_DYNAMIC = 4
+MQQA_GET_INHIBITED = 1
+MQQA_GET_ALLOWED = 0
+MQQA_PUT_INHIBITED = 1
+MQQA_PUT_ALLOWED = 0
+MQQA_SHAREABLE = 1
+MQQA_NOT_SHAREABLE = 0
+MQQA_BACKOUT_HARDENED = 1
+MQQA_BACKOUT_NOT_HARDENED = 0
+MQMDS_PRIORITY = 0
+MQMDS_FIFO = 1
+MQNPM_CLASS_NORMAL = 0
+MQNPM_CLASS_HIGH = 10
+MQTC_OFF = 0
+MQTC_ON = 1
+MQTT_NONE = 0
+MQTT_FIRST = 1
+MQTT_EVERY = 2
+MQTT_DEPTH = 3
+MQTRIGGER_RESTART_NO = 0
+MQTRIGGER_RESTART_YES = 1
+MQUS_NORMAL = 0
+MQUS_TRANSMISSION = 1
+MQDL_SUPPORTED = 1
+MQDL_NOT_SUPPORTED = 0
+MQIT_NONE = 0
+MQIT_MSG_ID = 1
+MQIT_CORREL_ID = 2
+MQIT_MSG_TOKEN = 4
+MQIT_GROUP_ID = 5
+MQBND_BIND_ON_OPEN = 0
+MQBND_BIND_NOT_FIXED = 1
+MQQSGD_ALL = (-1)
+MQQSGD_Q_MGR = 0
+MQQSGD_COPY = 1
+MQQSGD_SHARED = 2
+MQQSGD_GROUP = 3
+MQQSGD_PRIVATE = 4
+MQQSGD_LIVE = 6
+MQREORG_DISABLED = 0
+MQREORG_ENABLED = 1
+MQREADA_NO = 0
+MQREADA_YES = 1
+MQREADA_DISABLED = 2
+MQREADA_INHIBITED = 3
+MQREADA_BACKLOG = 4
+MQPROP_COMPATIBILITY = 0
+MQPROP_NONE = 1
+MQPROP_ALL = 2
+MQPROP_FORCE_MQRFH2 = 3
+MQNC_MAX_NAMELIST_NAME_COUNT = 256
+MQNT_NONE = 0
+MQNT_Q = 1
+MQNT_CLUSTER = 2
+MQNT_AUTH_INFO = 4
+MQNT_ALL = 1001
+MQCFR_YES = 1
+MQCFR_NO = 0
+MQSVC_TYPE_COMMAND = 0
+MQSVC_TYPE_SERVER = 1
+MQADOPT_CHECK_NONE = 0
+MQADOPT_CHECK_ALL = 1
+MQADOPT_CHECK_Q_MGR_NAME = 2
+MQADOPT_CHECK_NET_ADDR = 4
+MQADOPT_TYPE_NO = 0
+MQADOPT_TYPE_ALL = 1
+MQADOPT_TYPE_SVR = 2
+MQADOPT_TYPE_SDR = 4
+MQADOPT_TYPE_RCVR = 8
+MQADOPT_TYPE_CLUSRCVR = 16
+MQAUTO_START_NO = 0
+MQAUTO_START_YES = 1
+MQCHAD_DISABLED = 0
+MQCHAD_ENABLED = 1
+MQCLWL_USEQ_LOCAL = 0
+MQCLWL_USEQ_ANY = 1
+MQCLWL_USEQ_AS_Q_MGR = (-3)
+MQCMDL_LEVEL_1 = 100
+MQCMDL_LEVEL_101 = 101
+MQCMDL_LEVEL_110 = 110
+MQCMDL_LEVEL_114 = 114
+MQCMDL_LEVEL_120 = 120
+MQCMDL_LEVEL_200 = 200
+MQCMDL_LEVEL_201 = 201
+MQCMDL_LEVEL_210 = 210
+MQCMDL_LEVEL_211 = 211
+MQCMDL_LEVEL_220 = 220
+MQCMDL_LEVEL_221 = 221
+MQCMDL_LEVEL_230 = 230
+MQCMDL_LEVEL_320 = 320
+MQCMDL_LEVEL_420 = 420
+MQCMDL_LEVEL_500 = 500
+MQCMDL_LEVEL_510 = 510
+MQCMDL_LEVEL_520 = 520
+MQCMDL_LEVEL_530 = 530
+MQCMDL_LEVEL_531 = 531
+MQCMDL_LEVEL_600 = 600
+MQCMDL_LEVEL_700 = 700
+MQCSRV_CONVERT_NO = 0
+MQCSRV_CONVERT_YES = 1
+MQCSRV_DLQ_NO = 0
+MQCSRV_DLQ_YES = 1
+MQDNSWLM_NO = 0
+MQDNSWLM_YES = 1
+MQEXPI_OFF = 0
+MQIGQ_DISABLED = 0
+MQIGQ_ENABLED = 1
+MQIGQPA_DEFAULT = 1
+MQIGQPA_CONTEXT = 2
+MQIGQPA_ONLY_IGQ = 3
+MQIGQPA_ALTERNATE_OR_IGQ = 4
+MQIPADDR_IPV4 = 0
+MQIPADDR_IPV6 = 1
+MQMMBI_UNLIMITED = (-1)
+MQMON_NOT_AVAILABLE = (-1)
+MQMON_NONE = (-1)
+MQMON_Q_MGR = (-3)
+MQMON_OFF = 0
+MQMON_ON = 1
+MQMON_DISABLED = 0
+MQMON_ENABLED = 1
+MQMON_LOW = 17
+MQMON_MEDIUM = 33
+MQMON_HIGH = 65
+MQPL_MVS = 1
+MQPL_OS390 = 1
+MQPL_ZOS = 1
+MQPL_OS2 = 2
+MQPL_AIX = 3
+MQPL_UNIX = 3
+MQPL_OS400 = 4
+MQPL_WINDOWS = 5
+MQPL_WINDOWS_NT = 11
+MQPL_VMS = 12
+MQPL_NSK = 13
+MQPL_NSS = 13
+MQPL_OPEN_TP1 = 15
+MQPL_VM = 18
+MQPL_TPF = 23
+MQPL_VSE = 27
+MQPROP_UNRESTRICTED_LENGTH = (-1)
+MQPSM_DISABLED = 0
+MQPSM_COMPAT = 1
+MQPSM_ENABLED = 2
+MQQMOPT_DISABLED = 0
+MQQMOPT_ENABLED = 1
+MQQMOPT_REPLY = 2
+MQRCVTIME_MULTIPLY = 0
+MQRCVTIME_ADD = 1
+MQRCVTIME_EQUAL = 2
+MQRECORDING_DISABLED = 0
+MQRECORDING_Q = 1
+MQRECORDING_MSG = 2
+MQSCYC_UPPER = 0
+MQSCYC_MIXED = 1
+MQSQQM_USE = 0
+MQSQQM_IGNORE = 1
+MQSSL_FIPS_NO = 0
+MQSSL_FIPS_YES = 1
+MQSP_AVAILABLE = 1
+MQSP_NOT_AVAILABLE = 0
+MQSVC_CONTROL_Q_MGR = 0
+MQSVC_CONTROL_Q_MGR_START = 1
+MQSVC_CONTROL_MANUAL = 2
+MQSVC_STATUS_STOPPED = 0
+MQSVC_STATUS_STARTING = 1
+MQSVC_STATUS_RUNNING = 2
+MQSVC_STATUS_STOPPING = 3
+MQSVC_STATUS_RETRYING = 4
+MQTCPKEEP_NO = 0
+MQTCPKEEP_YES = 1
+MQTCPSTACK_SINGLE = 0
+MQTCPSTACK_MULTIPLE = 1
+MQTRAXSTR_NO = 0
+MQTRAXSTR_YES = 1
+MQDLV_AS_PARENT = 0
+MQDLV_ALL = 1
+MQDLV_ALL_DUR = 2
+MQDLV_ALL_AVAIL = 3
+MQMASTER_NO = 0
+MQMASTER_YES = 1
+MQSCOPE_ALL = 0
+MQSCOPE_AS_PARENT = 1
+MQSCOPE_QMGR = 4
+MQSUB_DURABLE_AS_PARENT = 0
+MQSUB_DURABLE_ALLOWED = 1
+MQSUB_DURABLE_INHIBITED = 2
+MQTA_BLOCK = 1
+MQTA_PASSTHRU = 2
+MQTA_SUB_AS_PARENT = 0
+MQTA_SUB_INHIBITED = 1
+MQTA_SUB_ALLOWED = 2
+MQTA_PROXY_SUB_FORCE = 1
+MQTA_PROXY_SUB_FIRSTUSE = 2
+MQTA_PUB_AS_PARENT = 0
+MQTA_PUB_INHIBITED = 1
+MQTA_PUB_ALLOWED = 2
+MQTOPT_LOCAL = 0
+MQTOPT_CLUSTER = 1
+MQTOPT_ALL = 2
+MQDC_MANAGED = 1
+MQDC_PROVIDED = 2
+MQPSPROP_NONE = 0
+MQPSPROP_COMPAT = 1
+MQPSPROP_RFH2 = 2
+MQPSPROP_MSGPROP = 3
+MQRU_PUBLISH_ON_REQUEST = 1
+MQRU_PUBLISH_ALL = 2
+MQSUB_DURABLE_ALL = (-1)
+MQSUB_DURABLE_YES = 1
+MQSUB_DURABLE_NO = 2
+MQTSCOPE_QMGR = 1
+MQTSCOPE_ALL = 2
+MQVU_FIXED_USER = 1
+MQVU_ANY_USER = 2
+MQWS_DEFAULT = 0
+MQWS_CHAR = 1
+MQWS_TOPIC = 2
+MQRR_DEFAULT = MQCC_OK,\
+                      MQRC_NONE
+
+# Manually added
+
+MQGS_NOT_IN_GROUP = ord(' ')
+MQGS_MSG_IN_GROUP = ord('G')
+MQGS_LAST_MSG_IN_GROUP = ord('L')
+MQSS_NOT_A_SEGMENT = ord(' ')
+MQSS_SEGMENT = ord('S')
+MQSS_LAST_SEGMENT = ord('L')
+MQSEG_INHIBITED = ord(' ')
+MQSEG_ALLOWED = ord('A')
+
+#
+# MQCD defines courtesy of John OSullivan (mailto:jos@onebox.com)
+#
+
+#
+# ======================================================================
+#                                WARNING
+# ======================================================================
+# The following MQ constants are kept here only for compatibility with
+# PyMQI versions prior to 1.0 and they will be removed in the future. Any new
+# development should use the very same constants from pymqi.CMQXC which are
+# always up to date with current WebSphere MQ versions and which also take into
+# account differences in 32bit vs. 64bit modes.
+#
+
+MQCD_VERSION_1     =  1L
+MQCD_VERSION_2     =  2L
+MQCD_VERSION_3     =  3L
+MQCD_VERSION_4     =  4L
+MQCD_VERSION_5     =  5L
+MQCD_VERSION_6     =  6L
+MQCD_VERSION_7     =  7L
+MQCD_VERSION_8     =  8L
+MQCD_VERSION_9     =  9L
+MQCD_CURRENT_VERSION = 9L
+
+MQCD_LENGTH_4 =1540L
+MQCD_LENGTH_5 =1552L
+MQCD_LENGTH_6 =1648L
+MQCD_CURRENT_LENGTH =1648L
+
+MQCHT_SENDER   = 1L
+MQCHT_SERVER   = 2L
+MQCHT_RECEIVER = 3L
+MQCHT_REQUESTER= 4L
+MQCHT_ALL      = 5L
+MQCHT_CLNTCONN = 6L
+MQCHT_SVRCONN  = 7L
+MQCHT_CLUSRCVR = 8L
+MQCHT_CLUSSDR  = 9L
+
+MQXPT_LOCAL  = 0L
+MQXPT_LU62   = 1L
+MQXPT_TCP    = 2L
+MQXPT_NETBIOS= 3L
+MQXPT_SPX    = 4L
+MQXPT_DECNET = 5L
+MQXPT_UDP    = 6L
+
+MQPA_DEFAULT =1L
+MQPA_CONTEXT =2L
+MQPA_ONLY_MCA=         3L
+MQPA_ALTERNATE_OR_MCA =4L
+
+MQCDC_SENDER_CONVERSION =   1L
+MQCDC_NO_SENDER_CONVERSION =0L
+
+MQMCAT_PROCESS =1L
+MQMCAT_THREAD  =2L
+
+MQNPMS_NORMAL =1L
+MQNPMS_FAST   =2L
+
+MQCXP_STRUC_ID ="CXP "
+
+MQCXP_STRUC_ID_ARRAY =['C','X','P',' ']
+
+MQCXP_VERSION_1      = 1L
+MQCXP_VERSION_2     =  2L
+MQCXP_VERSION_3     =  3L
+MQCXP_VERSION_4     =  4L
+MQCXP_CURRENT_VERSION= 4L
+
+MQXR2_PUT_WITH_DEF_ACTION = 0L
+MQXR2_PUT_WITH_DEF_USERID = 1L
+MQXR2_PUT_WITH_MSG_USERID = 2L
+MQXR2_USE_AGENT_BUFFER    = 0L
+MQXR2_USE_EXIT_BUFFER     = 4L
+MQXR2_DEFAULT_CONTINUATION= 0L
+MQXR2_CONTINUE_CHAIN      = 8L
+MQXR2_SUPPRESS_CHAIN      = 16L
+
+MQCF_NONE       =0x00000000L
+MQCF_DIST_LISTS =0x00000001L
+
+
+MQDXP_STRUC_ID ="DXP "
+
+MQDXP_STRUC_ID_ARRAY =['D','X','P',' ']
+
+MQDXP_VERSION_1       =1L
+MQDXP_CURRENT_VERSION =1L
+
+MQXDR_OK                =0L
+MQXDR_CONVERSION_FAILED =1L
+
+MQPXP_STRUC_ID ="PXP "
+
+MQPXP_STRUC_ID_ARRAY =['P','X','P',' ']
+
+MQPXP_VERSION_1       =1L
+MQPXP_CURRENT_VERSION =1L
+
+MQDT_APPL   =1L
+MQDT_BROKER =2L
+
+
+
+MQWDR_STRUC_ID ="WDR "
+
+MQWDR_STRUC_ID_ARRAY =['W','D','R',' ']
+
+MQWDR_VERSION_1       =1L
+MQWDR_CURRENT_VERSION =1L
+
+MQWDR_LENGTH_1       =124L
+MQWDR_CURRENT_LENGTH =124L
+
+MQQMF_REPOSITORY_Q_MGR     =0x00000002L
+MQQMF_CLUSSDR_USER_DEFINED =0x00000008L
+MQQMF_CLUSSDR_AUTO_DEFINED =0x00000010L
+MQQMF_AVAILABLE            =0x00000020L
+
+
+MQWQR_STRUC_ID ="WQR "
+
+MQWQR_STRUC_ID_ARRAY =['W','Q','R',' ']
+
+MQWQR_VERSION_1       =1L
+MQWQR_CURRENT_VERSION =1L
+
+MQWQR_LENGTH_1       =200L
+MQWQR_CURRENT_LENGTH =200L
+
+MQQF_LOCAL_Q =0x00000001L
+
+MQWXP_STRUC_ID ="WXP "
+
+MQWXP_STRUC_ID_ARRAY =['W','X','P',' ']
+
+MQWXP_VERSION_1       =1L
+MQWXP_CURRENT_VERSION =1L
+MQXT_CHANNEL_SEC_EXIT =      11L
+MQXT_CHANNEL_MSG_EXIT =      12L
+MQXT_CHANNEL_SEND_EXIT =     13L
+MQXT_CHANNEL_RCV_EXIT  =     14L
+MQXT_CHANNEL_MSG_RETRY_EXIT =15L
+MQXT_CHANNEL_AUTO_DEF_EXIT  =16L
+MQXT_CLUSTER_WORKLOAD_EXIT  =20L
+MQXT_PUBSUB_ROUTING_EXIT    =21L
+
+MQXR_INIT               = 11L
+MQXR_TERM               = 12L
+MQXR_MSG                = 13L
+MQXR_XMIT               = 14L
+MQXR_SEC_MSG            = 15L
+MQXR_INIT_SEC           = 16L
+MQXR_RETRY              = 17L
+MQXR_AUTO_CLUSSDR       = 18L
+MQXR_AUTO_RECEIVER      = 19L
+MQXR_CLWL_OPEN          = 20L
+MQXR_CLWL_PUT           = 21L
+MQXR_CLWL_MOVE          = 22L
+MQXR_CLWL_REPOS         = 23L
+MQXR_CLWL_REPOS_MOVE    = 24L
+MQXR_AUTO_SVRCONN       = 27L
+MQXR_AUTO_CLUSRCVR      = 28L
+
+MQXCC_OK                    =   0L
+MQXCC_SUPPRESS_FUNCTION     =   (-1L)
+MQXCC_SKIP_FUNCTION         =   (-2L)
+MQXCC_SEND_AND_REQUEST_SEC_MSG =(-3L)
+MQXCC_SEND_SEC_MSG            = (-4L)
+MQXCC_SUPPRESS_EXIT           = (-5L)
+MQXCC_CLOSE_CHANNEL           = (-6L)
+
+MQXUA_NONE ="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+
+MQXUA_NONE_ARRAY =['\0','\0','\0','\0','\0','\0','\0','\0',
+                 '\0','\0','\0','\0','\0','\0','\0','\0']
+
+
+MQDCC_DEFAULT_CONVERSION   =0x00000001L
+MQDCC_FILL_TARGET_BUFFER   =0x00000002L
+MQDCC_SOURCE_ENC_NATIVE    =0x00000020L
+MQDCC_SOURCE_ENC_NORMAL    =0x00000010L
+MQDCC_SOURCE_ENC_REVERSED  =0x00000020L
+MQDCC_SOURCE_ENC_UNDEFINED =0x00000000L
+MQDCC_TARGET_ENC_NATIVE    =0x00000200L
+MQDCC_TARGET_ENC_NORMAL    =0x00000100L
+MQDCC_TARGET_ENC_REVERSED  =0x00000200L
+MQDCC_TARGET_ENC_UNDEFINED =0x00000000L
+MQDCC_NONE                 =0x00000000L
+
+MQDCC_SOURCE_ENC_MASK   =0x000000f0L
+MQDCC_TARGET_ENC_MASK   =0x00000f00L
+MQDCC_SOURCE_ENC_FACTOR  =  16L
+MQDCC_TARGET_ENC_FACTOR  =  256L
+
+# ======================================================================
diff --git a/code/CMQCFC.py b/code/CMQCFC.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9DTVFDRkMucHk=
--- /dev/null
+++ b/code/CMQCFC.py
@@ -0,0 +1,1650 @@
+# Generated by h2py from /opt/mqm/inc/cmqcfc.h
+MQCFH_STRUC_LENGTH = 36
+MQCFH_VERSION_1 = 1
+MQCFH_VERSION_2 = 2
+MQCFH_VERSION_3 = 3
+MQCFH_CURRENT_VERSION = 3
+MQCMD_NONE = 0
+MQCMD_CHANGE_Q_MGR = 1
+MQCMD_INQUIRE_Q_MGR = 2
+MQCMD_CHANGE_PROCESS = 3
+MQCMD_COPY_PROCESS = 4
+MQCMD_CREATE_PROCESS = 5
+MQCMD_DELETE_PROCESS = 6
+MQCMD_INQUIRE_PROCESS = 7
+MQCMD_CHANGE_Q = 8
+MQCMD_CLEAR_Q = 9
+MQCMD_COPY_Q = 10
+MQCMD_CREATE_Q = 11
+MQCMD_DELETE_Q = 12
+MQCMD_INQUIRE_Q = 13
+MQCMD_REFRESH_Q_MGR = 16
+MQCMD_RESET_Q_STATS = 17
+MQCMD_INQUIRE_Q_NAMES = 18
+MQCMD_INQUIRE_PROCESS_NAMES = 19
+MQCMD_INQUIRE_CHANNEL_NAMES = 20
+MQCMD_CHANGE_CHANNEL = 21
+MQCMD_COPY_CHANNEL = 22
+MQCMD_CREATE_CHANNEL = 23
+MQCMD_DELETE_CHANNEL = 24
+MQCMD_INQUIRE_CHANNEL = 25
+MQCMD_PING_CHANNEL = 26
+MQCMD_RESET_CHANNEL = 27
+MQCMD_START_CHANNEL = 28
+MQCMD_STOP_CHANNEL = 29
+MQCMD_START_CHANNEL_INIT = 30
+MQCMD_START_CHANNEL_LISTENER = 31
+MQCMD_CHANGE_NAMELIST = 32
+MQCMD_COPY_NAMELIST = 33
+MQCMD_CREATE_NAMELIST = 34
+MQCMD_DELETE_NAMELIST = 35
+MQCMD_INQUIRE_NAMELIST = 36
+MQCMD_INQUIRE_NAMELIST_NAMES = 37
+MQCMD_ESCAPE = 38
+MQCMD_RESOLVE_CHANNEL = 39
+MQCMD_PING_Q_MGR = 40
+MQCMD_INQUIRE_Q_STATUS = 41
+MQCMD_INQUIRE_CHANNEL_STATUS = 42
+MQCMD_CONFIG_EVENT = 43
+MQCMD_Q_MGR_EVENT = 44
+MQCMD_PERFM_EVENT = 45
+MQCMD_CHANNEL_EVENT = 46
+MQCMD_DELETE_PUBLICATION = 60
+MQCMD_DEREGISTER_PUBLISHER = 61
+MQCMD_DEREGISTER_SUBSCRIBER = 62
+MQCMD_PUBLISH = 63
+MQCMD_REGISTER_PUBLISHER = 64
+MQCMD_REGISTER_SUBSCRIBER = 65
+MQCMD_REQUEST_UPDATE = 66
+MQCMD_BROKER_INTERNAL = 67
+MQCMD_ACTIVITY_MSG = 69
+MQCMD_INQUIRE_CLUSTER_Q_MGR = 70
+MQCMD_RESUME_Q_MGR_CLUSTER = 71
+MQCMD_SUSPEND_Q_MGR_CLUSTER = 72
+MQCMD_REFRESH_CLUSTER = 73
+MQCMD_RESET_CLUSTER = 74
+MQCMD_TRACE_ROUTE = 75
+MQCMD_REFRESH_SECURITY = 78
+MQCMD_CHANGE_AUTH_INFO = 79
+MQCMD_COPY_AUTH_INFO = 80
+MQCMD_CREATE_AUTH_INFO = 81
+MQCMD_DELETE_AUTH_INFO = 82
+MQCMD_INQUIRE_AUTH_INFO = 83
+MQCMD_INQUIRE_AUTH_INFO_NAMES = 84
+MQCMD_INQUIRE_CONNECTION = 85
+MQCMD_STOP_CONNECTION = 86
+MQCMD_INQUIRE_AUTH_RECS = 87
+MQCMD_INQUIRE_ENTITY_AUTH = 88
+MQCMD_DELETE_AUTH_REC = 89
+MQCMD_SET_AUTH_REC = 90
+MQCMD_LOGGER_EVENT = 91
+MQCMD_RESET_Q_MGR = 92
+MQCMD_CHANGE_LISTENER = 93
+MQCMD_COPY_LISTENER = 94
+MQCMD_CREATE_LISTENER = 95
+MQCMD_DELETE_LISTENER = 96
+MQCMD_INQUIRE_LISTENER = 97
+MQCMD_INQUIRE_LISTENER_STATUS = 98
+MQCMD_COMMAND_EVENT = 99
+MQCMD_CHANGE_SECURITY = 100
+MQCMD_CHANGE_CF_STRUC = 101
+MQCMD_CHANGE_STG_CLASS = 102
+MQCMD_CHANGE_TRACE = 103
+MQCMD_ARCHIVE_LOG = 104
+MQCMD_BACKUP_CF_STRUC = 105
+MQCMD_CREATE_BUFFER_POOL = 106
+MQCMD_CREATE_PAGE_SET = 107
+MQCMD_CREATE_CF_STRUC = 108
+MQCMD_CREATE_STG_CLASS = 109
+MQCMD_COPY_CF_STRUC = 110
+MQCMD_COPY_STG_CLASS = 111
+MQCMD_DELETE_CF_STRUC = 112
+MQCMD_DELETE_STG_CLASS = 113
+MQCMD_INQUIRE_ARCHIVE = 114
+MQCMD_INQUIRE_CF_STRUC = 115
+MQCMD_INQUIRE_CF_STRUC_STATUS = 116
+MQCMD_INQUIRE_CMD_SERVER = 117
+MQCMD_INQUIRE_CHANNEL_INIT = 118
+MQCMD_INQUIRE_QSG = 119
+MQCMD_INQUIRE_LOG = 120
+MQCMD_INQUIRE_SECURITY = 121
+MQCMD_INQUIRE_STG_CLASS = 122
+MQCMD_INQUIRE_SYSTEM = 123
+MQCMD_INQUIRE_THREAD = 124
+MQCMD_INQUIRE_TRACE = 125
+MQCMD_INQUIRE_USAGE = 126
+MQCMD_MOVE_Q = 127
+MQCMD_RECOVER_BSDS = 128
+MQCMD_RECOVER_CF_STRUC = 129
+MQCMD_RESET_TPIPE = 130
+MQCMD_RESOLVE_INDOUBT = 131
+MQCMD_RESUME_Q_MGR = 132
+MQCMD_REVERIFY_SECURITY = 133
+MQCMD_SET_ARCHIVE = 134
+MQCMD_SET_LOG = 136
+MQCMD_SET_SYSTEM = 137
+MQCMD_START_CMD_SERVER = 138
+MQCMD_START_Q_MGR = 139
+MQCMD_START_TRACE = 140
+MQCMD_STOP_CHANNEL_INIT = 141
+MQCMD_STOP_CHANNEL_LISTENER = 142
+MQCMD_STOP_CMD_SERVER = 143
+MQCMD_STOP_Q_MGR = 144
+MQCMD_STOP_TRACE = 145
+MQCMD_SUSPEND_Q_MGR = 146
+MQCMD_INQUIRE_CF_STRUC_NAMES = 147
+MQCMD_INQUIRE_STG_CLASS_NAMES = 148
+MQCMD_CHANGE_SERVICE = 149
+MQCMD_COPY_SERVICE = 150
+MQCMD_CREATE_SERVICE = 151
+MQCMD_DELETE_SERVICE = 152
+MQCMD_INQUIRE_SERVICE = 153
+MQCMD_INQUIRE_SERVICE_STATUS = 154
+MQCMD_START_SERVICE = 155
+MQCMD_STOP_SERVICE = 156
+MQCMD_DELETE_BUFFER_POOL = 157
+MQCMD_DELETE_PAGE_SET = 158
+MQCMD_CHANGE_BUFFER_POOL = 159
+MQCMD_CHANGE_PAGE_SET = 160
+MQCMD_INQUIRE_Q_MGR_STATUS = 161
+MQCMD_CREATE_LOG = 162
+MQCMD_STATISTICS_MQI = 164
+MQCMD_STATISTICS_Q = 165
+MQCMD_STATISTICS_CHANNEL = 166
+MQCMD_ACCOUNTING_MQI = 167
+MQCMD_ACCOUNTING_Q = 168
+MQCMD_INQUIRE_AUTH_SERVICE = 169
+MQCMD_CHANGE_TOPIC = 170
+MQCMD_COPY_TOPIC = 171
+MQCMD_CREATE_TOPIC = 172
+MQCMD_DELETE_TOPIC = 173
+MQCMD_INQUIRE_TOPIC = 174
+MQCMD_INQUIRE_TOPIC_NAMES = 175
+MQCMD_INQUIRE_SUBSCRIPTION = 176
+MQCMD_CREATE_SUBSCRIPTION = 177
+MQCMD_CHANGE_SUBSCRIPTION = 178
+MQCMD_DELETE_SUBSCRIPTION = 179
+MQCMD_COPY_SUBSCRIPTION = 181
+MQCMD_INQUIRE_SUB_STATUS = 182
+MQCMD_INQUIRE_TOPIC_STATUS = 183
+MQCMD_CLEAR_TOPIC_STRING = 184
+MQCMD_INQUIRE_PUBSUB_STATUS = 185
+MQCFC_LAST = 1
+MQCFC_NOT_LAST = 0
+MQRCCF_CFH_TYPE_ERROR = 3001
+MQRCCF_CFH_LENGTH_ERROR = 3002
+MQRCCF_CFH_VERSION_ERROR = 3003
+MQRCCF_CFH_MSG_SEQ_NUMBER_ERR = 3004
+MQRCCF_CFH_CONTROL_ERROR = 3005
+MQRCCF_CFH_PARM_COUNT_ERROR = 3006
+MQRCCF_CFH_COMMAND_ERROR = 3007
+MQRCCF_COMMAND_FAILED = 3008
+MQRCCF_CFIN_LENGTH_ERROR = 3009
+MQRCCF_CFST_LENGTH_ERROR = 3010
+MQRCCF_CFST_STRING_LENGTH_ERR = 3011
+MQRCCF_FORCE_VALUE_ERROR = 3012
+MQRCCF_STRUCTURE_TYPE_ERROR = 3013
+MQRCCF_CFIN_PARM_ID_ERROR = 3014
+MQRCCF_CFST_PARM_ID_ERROR = 3015
+MQRCCF_MSG_LENGTH_ERROR = 3016
+MQRCCF_CFIN_DUPLICATE_PARM = 3017
+MQRCCF_CFST_DUPLICATE_PARM = 3018
+MQRCCF_PARM_COUNT_TOO_SMALL = 3019
+MQRCCF_PARM_COUNT_TOO_BIG = 3020
+MQRCCF_Q_ALREADY_IN_CELL = 3021
+MQRCCF_Q_TYPE_ERROR = 3022
+MQRCCF_MD_FORMAT_ERROR = 3023
+MQRCCF_CFSL_LENGTH_ERROR = 3024
+MQRCCF_REPLACE_VALUE_ERROR = 3025
+MQRCCF_CFIL_DUPLICATE_VALUE = 3026
+MQRCCF_CFIL_COUNT_ERROR = 3027
+MQRCCF_CFIL_LENGTH_ERROR = 3028
+MQRCCF_QUIESCE_VALUE_ERROR = 3029
+MQRCCF_MODE_VALUE_ERROR = 3029
+MQRCCF_MSG_SEQ_NUMBER_ERROR = 3030
+MQRCCF_PING_DATA_COUNT_ERROR = 3031
+MQRCCF_PING_DATA_COMPARE_ERROR = 3032
+MQRCCF_CFSL_PARM_ID_ERROR = 3033
+MQRCCF_CHANNEL_TYPE_ERROR = 3034
+MQRCCF_PARM_SEQUENCE_ERROR = 3035
+MQRCCF_XMIT_PROTOCOL_TYPE_ERR = 3036
+MQRCCF_BATCH_SIZE_ERROR = 3037
+MQRCCF_DISC_INT_ERROR = 3038
+MQRCCF_SHORT_RETRY_ERROR = 3039
+MQRCCF_SHORT_TIMER_ERROR = 3040
+MQRCCF_LONG_RETRY_ERROR = 3041
+MQRCCF_LONG_TIMER_ERROR = 3042
+MQRCCF_SEQ_NUMBER_WRAP_ERROR = 3043
+MQRCCF_MAX_MSG_LENGTH_ERROR = 3044
+MQRCCF_PUT_AUTH_ERROR = 3045
+MQRCCF_PURGE_VALUE_ERROR = 3046
+MQRCCF_CFIL_PARM_ID_ERROR = 3047
+MQRCCF_MSG_TRUNCATED = 3048
+MQRCCF_CCSID_ERROR = 3049
+MQRCCF_ENCODING_ERROR = 3050
+MQRCCF_QUEUES_VALUE_ERROR = 3051
+MQRCCF_DATA_CONV_VALUE_ERROR = 3052
+MQRCCF_INDOUBT_VALUE_ERROR = 3053
+MQRCCF_ESCAPE_TYPE_ERROR = 3054
+MQRCCF_REPOS_VALUE_ERROR = 3055
+MQRCCF_CHANNEL_TABLE_ERROR = 3062
+MQRCCF_MCA_TYPE_ERROR = 3063
+MQRCCF_CHL_INST_TYPE_ERROR = 3064
+MQRCCF_CHL_STATUS_NOT_FOUND = 3065
+MQRCCF_CFSL_DUPLICATE_PARM = 3066
+MQRCCF_CFSL_TOTAL_LENGTH_ERROR = 3067
+MQRCCF_CFSL_COUNT_ERROR = 3068
+MQRCCF_CFSL_STRING_LENGTH_ERR = 3069
+MQRCCF_BROKER_DELETED = 3070
+MQRCCF_STREAM_ERROR = 3071
+MQRCCF_TOPIC_ERROR = 3072
+MQRCCF_NOT_REGISTERED = 3073
+MQRCCF_Q_MGR_NAME_ERROR = 3074
+MQRCCF_INCORRECT_STREAM = 3075
+MQRCCF_Q_NAME_ERROR = 3076
+MQRCCF_NO_RETAINED_MSG = 3077
+MQRCCF_DUPLICATE_IDENTITY = 3078
+MQRCCF_INCORRECT_Q = 3079
+MQRCCF_CORREL_ID_ERROR = 3080
+MQRCCF_NOT_AUTHORIZED = 3081
+MQRCCF_UNKNOWN_STREAM = 3082
+MQRCCF_REG_OPTIONS_ERROR = 3083
+MQRCCF_PUB_OPTIONS_ERROR = 3084
+MQRCCF_UNKNOWN_BROKER = 3085
+MQRCCF_Q_MGR_CCSID_ERROR = 3086
+MQRCCF_DEL_OPTIONS_ERROR = 3087
+MQRCCF_CLUSTER_NAME_CONFLICT = 3088
+MQRCCF_REPOS_NAME_CONFLICT = 3089
+MQRCCF_CLUSTER_Q_USAGE_ERROR = 3090
+MQRCCF_ACTION_VALUE_ERROR = 3091
+MQRCCF_COMMS_LIBRARY_ERROR = 3092
+MQRCCF_NETBIOS_NAME_ERROR = 3093
+MQRCCF_BROKER_COMMAND_FAILED = 3094
+MQRCCF_CFST_CONFLICTING_PARM = 3095
+MQRCCF_PATH_NOT_VALID = 3096
+MQRCCF_PARM_SYNTAX_ERROR = 3097
+MQRCCF_PWD_LENGTH_ERROR = 3098
+MQRCCF_FILTER_ERROR = 3150
+MQRCCF_WRONG_USER = 3151
+MQRCCF_DUPLICATE_SUBSCRIPTION = 3152
+MQRCCF_SUB_NAME_ERROR = 3153
+MQRCCF_SUB_IDENTITY_ERROR = 3154
+MQRCCF_SUBSCRIPTION_IN_USE = 3155
+MQRCCF_SUBSCRIPTION_LOCKED = 3156
+MQRCCF_ALREADY_JOINED = 3157
+MQRCCF_OBJECT_IN_USE = 3160
+MQRCCF_UNKNOWN_FILE_NAME = 3161
+MQRCCF_FILE_NOT_AVAILABLE = 3162
+MQRCCF_DISC_RETRY_ERROR = 3163
+MQRCCF_ALLOC_RETRY_ERROR = 3164
+MQRCCF_ALLOC_SLOW_TIMER_ERROR = 3165
+MQRCCF_ALLOC_FAST_TIMER_ERROR = 3166
+MQRCCF_PORT_NUMBER_ERROR = 3167
+MQRCCF_CHL_SYSTEM_NOT_ACTIVE = 3168
+MQRCCF_ENTITY_NAME_MISSING = 3169
+MQRCCF_PROFILE_NAME_ERROR = 3170
+MQRCCF_AUTH_VALUE_ERROR = 3171
+MQRCCF_AUTH_VALUE_MISSING = 3172
+MQRCCF_OBJECT_TYPE_MISSING = 3173
+MQRCCF_CONNECTION_ID_ERROR = 3174
+MQRCCF_LOG_TYPE_ERROR = 3175
+MQRCCF_PROGRAM_NOT_AVAILABLE = 3176
+MQRCCF_PROGRAM_AUTH_FAILED = 3177
+MQRCCF_NONE_FOUND = 3200
+MQRCCF_SECURITY_SWITCH_OFF = 3201
+MQRCCF_SECURITY_REFRESH_FAILED = 3202
+MQRCCF_PARM_CONFLICT = 3203
+MQRCCF_COMMAND_INHIBITED = 3204
+MQRCCF_OBJECT_BEING_DELETED = 3205
+MQRCCF_STORAGE_CLASS_IN_USE = 3207
+MQRCCF_OBJECT_NAME_RESTRICTED = 3208
+MQRCCF_OBJECT_LIMIT_EXCEEDED = 3209
+MQRCCF_OBJECT_OPEN_FORCE = 3210
+MQRCCF_DISPOSITION_CONFLICT = 3211
+MQRCCF_Q_MGR_NOT_IN_QSG = 3212
+MQRCCF_ATTR_VALUE_FIXED = 3213
+MQRCCF_NAMELIST_ERROR = 3215
+MQRCCF_NO_CHANNEL_INITIATOR = 3217
+MQRCCF_CHANNEL_INITIATOR_ERROR = 3218
+MQRCCF_COMMAND_LEVEL_CONFLICT = 3222
+MQRCCF_Q_ATTR_CONFLICT = 3223
+MQRCCF_EVENTS_DISABLED = 3224
+MQRCCF_COMMAND_SCOPE_ERROR = 3225
+MQRCCF_COMMAND_REPLY_ERROR = 3226
+MQRCCF_FUNCTION_RESTRICTED = 3227
+MQRCCF_PARM_MISSING = 3228
+MQRCCF_PARM_VALUE_ERROR = 3229
+MQRCCF_COMMAND_LENGTH_ERROR = 3230
+MQRCCF_COMMAND_ORIGIN_ERROR = 3231
+MQRCCF_LISTENER_CONFLICT = 3232
+MQRCCF_LISTENER_STARTED = 3233
+MQRCCF_LISTENER_STOPPED = 3234
+MQRCCF_CHANNEL_ERROR = 3235
+MQRCCF_CF_STRUC_ERROR = 3236
+MQRCCF_UNKNOWN_USER_ID = 3237
+MQRCCF_UNEXPECTED_ERROR = 3238
+MQRCCF_NO_XCF_PARTNER = 3239
+MQRCCF_CFGR_PARM_ID_ERROR = 3240
+MQRCCF_CFIF_LENGTH_ERROR = 3241
+MQRCCF_CFIF_OPERATOR_ERROR = 3242
+MQRCCF_CFIF_PARM_ID_ERROR = 3243
+MQRCCF_CFSF_FILTER_VAL_LEN_ERR = 3244
+MQRCCF_CFSF_LENGTH_ERROR = 3245
+MQRCCF_CFSF_OPERATOR_ERROR = 3246
+MQRCCF_CFSF_PARM_ID_ERROR = 3247
+MQRCCF_TOO_MANY_FILTERS = 3248
+MQRCCF_LISTENER_RUNNING = 3249
+MQRCCF_LSTR_STATUS_NOT_FOUND = 3250
+MQRCCF_SERVICE_RUNNING = 3251
+MQRCCF_SERV_STATUS_NOT_FOUND = 3252
+MQRCCF_SERVICE_STOPPED = 3253
+MQRCCF_CFBS_DUPLICATE_PARM = 3254
+MQRCCF_CFBS_LENGTH_ERROR = 3255
+MQRCCF_CFBS_PARM_ID_ERROR = 3256
+MQRCCF_CFBS_STRING_LENGTH_ERR = 3257
+MQRCCF_CFGR_LENGTH_ERROR = 3258
+MQRCCF_CFGR_PARM_COUNT_ERROR = 3259
+MQRCCF_CONN_NOT_STOPPED = 3260
+MQRCCF_SERVICE_REQUEST_PENDING = 3261
+MQRCCF_NO_START_CMD = 3262
+MQRCCF_NO_STOP_CMD = 3263
+MQRCCF_CFBF_LENGTH_ERROR = 3264
+MQRCCF_CFBF_PARM_ID_ERROR = 3265
+MQRCCF_CFBF_OPERATOR_ERROR = 3266
+MQRCCF_CFBF_FILTER_VAL_LEN_ERR = 3267
+MQRCCF_LISTENER_STILL_ACTIVE = 3268
+MQRCCF_TOPICSTR_ALREADY_EXISTS = 3300
+MQRCCF_SHARING_CONVS_ERROR = 3301
+MQRCCF_SHARING_CONVS_TYPE = 3302
+MQRCCF_SECURITY_CASE_CONFLICT = 3303
+MQRCCF_TOPIC_TYPE_ERROR = 3305
+MQRCCF_MAX_INSTANCES_ERROR = 3306
+MQRCCF_MAX_INSTS_PER_CLNT_ERR = 3307
+MQRCCF_TOPIC_STRING_NOT_FOUND = 3308
+MQRCCF_SUBSCRIPTION_POINT_ERR = 3309
+MQRCCF_SUB_ALREADY_EXISTS = 3311
+MQRCCF_UNKNOWN_OBJECT_NAME = 3312
+MQRCCF_REMOTE_Q_NAME_ERROR = 3313
+MQRCCF_DURABILITY_NOT_ALLOWED = 3314
+MQRCCF_HOBJ_ERROR = 3315
+MQRCCF_DEST_NAME_ERROR = 3316
+MQRCCF_INVALID_DESTINATION = 3317
+MQRCCF_PUBSUB_INHIBITED = 3318
+MQRCCF_OBJECT_ALREADY_EXISTS = 4001
+MQRCCF_OBJECT_WRONG_TYPE = 4002
+MQRCCF_LIKE_OBJECT_WRONG_TYPE = 4003
+MQRCCF_OBJECT_OPEN = 4004
+MQRCCF_ATTR_VALUE_ERROR = 4005
+MQRCCF_UNKNOWN_Q_MGR = 4006
+MQRCCF_Q_WRONG_TYPE = 4007
+MQRCCF_OBJECT_NAME_ERROR = 4008
+MQRCCF_ALLOCATE_FAILED = 4009
+MQRCCF_HOST_NOT_AVAILABLE = 4010
+MQRCCF_CONFIGURATION_ERROR = 4011
+MQRCCF_CONNECTION_REFUSED = 4012
+MQRCCF_ENTRY_ERROR = 4013
+MQRCCF_SEND_FAILED = 4014
+MQRCCF_RECEIVED_DATA_ERROR = 4015
+MQRCCF_RECEIVE_FAILED = 4016
+MQRCCF_CONNECTION_CLOSED = 4017
+MQRCCF_NO_STORAGE = 4018
+MQRCCF_NO_COMMS_MANAGER = 4019
+MQRCCF_LISTENER_NOT_STARTED = 4020
+MQRCCF_BIND_FAILED = 4024
+MQRCCF_CHANNEL_INDOUBT = 4025
+MQRCCF_MQCONN_FAILED = 4026
+MQRCCF_MQOPEN_FAILED = 4027
+MQRCCF_MQGET_FAILED = 4028
+MQRCCF_MQPUT_FAILED = 4029
+MQRCCF_PING_ERROR = 4030
+MQRCCF_CHANNEL_IN_USE = 4031
+MQRCCF_CHANNEL_NOT_FOUND = 4032
+MQRCCF_UNKNOWN_REMOTE_CHANNEL = 4033
+MQRCCF_REMOTE_QM_UNAVAILABLE = 4034
+MQRCCF_REMOTE_QM_TERMINATING = 4035
+MQRCCF_MQINQ_FAILED = 4036
+MQRCCF_NOT_XMIT_Q = 4037
+MQRCCF_CHANNEL_DISABLED = 4038
+MQRCCF_USER_EXIT_NOT_AVAILABLE = 4039
+MQRCCF_COMMIT_FAILED = 4040
+MQRCCF_WRONG_CHANNEL_TYPE = 4041
+MQRCCF_CHANNEL_ALREADY_EXISTS = 4042
+MQRCCF_DATA_TOO_LARGE = 4043
+MQRCCF_CHANNEL_NAME_ERROR = 4044
+MQRCCF_XMIT_Q_NAME_ERROR = 4045
+MQRCCF_MCA_NAME_ERROR = 4047
+MQRCCF_SEND_EXIT_NAME_ERROR = 4048
+MQRCCF_SEC_EXIT_NAME_ERROR = 4049
+MQRCCF_MSG_EXIT_NAME_ERROR = 4050
+MQRCCF_RCV_EXIT_NAME_ERROR = 4051
+MQRCCF_XMIT_Q_NAME_WRONG_TYPE = 4052
+MQRCCF_MCA_NAME_WRONG_TYPE = 4053
+MQRCCF_DISC_INT_WRONG_TYPE = 4054
+MQRCCF_SHORT_RETRY_WRONG_TYPE = 4055
+MQRCCF_SHORT_TIMER_WRONG_TYPE = 4056
+MQRCCF_LONG_RETRY_WRONG_TYPE = 4057
+MQRCCF_LONG_TIMER_WRONG_TYPE = 4058
+MQRCCF_PUT_AUTH_WRONG_TYPE = 4059
+MQRCCF_KEEP_ALIVE_INT_ERROR = 4060
+MQRCCF_MISSING_CONN_NAME = 4061
+MQRCCF_CONN_NAME_ERROR = 4062
+MQRCCF_MQSET_FAILED = 4063
+MQRCCF_CHANNEL_NOT_ACTIVE = 4064
+MQRCCF_TERMINATED_BY_SEC_EXIT = 4065
+MQRCCF_DYNAMIC_Q_SCOPE_ERROR = 4067
+MQRCCF_CELL_DIR_NOT_AVAILABLE = 4068
+MQRCCF_MR_COUNT_ERROR = 4069
+MQRCCF_MR_COUNT_WRONG_TYPE = 4070
+MQRCCF_MR_EXIT_NAME_ERROR = 4071
+MQRCCF_MR_EXIT_NAME_WRONG_TYPE = 4072
+MQRCCF_MR_INTERVAL_ERROR = 4073
+MQRCCF_MR_INTERVAL_WRONG_TYPE = 4074
+MQRCCF_NPM_SPEED_ERROR = 4075
+MQRCCF_NPM_SPEED_WRONG_TYPE = 4076
+MQRCCF_HB_INTERVAL_ERROR = 4077
+MQRCCF_HB_INTERVAL_WRONG_TYPE = 4078
+MQRCCF_CHAD_ERROR = 4079
+MQRCCF_CHAD_WRONG_TYPE = 4080
+MQRCCF_CHAD_EVENT_ERROR = 4081
+MQRCCF_CHAD_EVENT_WRONG_TYPE = 4082
+MQRCCF_CHAD_EXIT_ERROR = 4083
+MQRCCF_CHAD_EXIT_WRONG_TYPE = 4084
+MQRCCF_SUPPRESSED_BY_EXIT = 4085
+MQRCCF_BATCH_INT_ERROR = 4086
+MQRCCF_BATCH_INT_WRONG_TYPE = 4087
+MQRCCF_NET_PRIORITY_ERROR = 4088
+MQRCCF_NET_PRIORITY_WRONG_TYPE = 4089
+MQRCCF_CHANNEL_CLOSED = 4090
+MQRCCF_Q_STATUS_NOT_FOUND = 4091
+MQRCCF_SSL_CIPHER_SPEC_ERROR = 4092
+MQRCCF_SSL_PEER_NAME_ERROR = 4093
+MQRCCF_SSL_CLIENT_AUTH_ERROR = 4094
+MQRCCF_RETAINED_NOT_SUPPORTED = 4095
+MQCFBF_STRUC_LENGTH_FIXED = 20
+MQCFBS_STRUC_LENGTH_FIXED = 16
+MQCFGR_STRUC_LENGTH = 16
+MQCFIF_STRUC_LENGTH = 20
+MQCFIL_STRUC_LENGTH_FIXED = 16
+MQCFIL64_STRUC_LENGTH_FIXED = 16
+MQCFIN_STRUC_LENGTH = 16
+MQCFIN64_STRUC_LENGTH = 24
+MQCFSF_STRUC_LENGTH_FIXED = 24
+MQCFSL_STRUC_LENGTH_FIXED = 24
+MQCFST_STRUC_LENGTH_FIXED = 20
+MQEPH_STRUC_ID = "EPH "
+MQEPH_STRUC_LENGTH_FIXED = 68
+MQEPH_VERSION_1 = 1
+MQEPH_CURRENT_VERSION = 1
+MQEPH_NONE = 0x00000000
+MQEPH_CCSID_EMBEDDED = 0x00000001
+MQ_ARCHIVE_PFX_LENGTH = 36
+MQ_ARCHIVE_UNIT_LENGTH = 8
+MQ_ASID_LENGTH = 4
+MQ_AUTH_PROFILE_NAME_LENGTH = 48
+MQ_CF_LEID_LENGTH = 12
+MQ_COMMAND_MQSC_LENGTH = 32768
+MQ_DATA_SET_NAME_LENGTH = 44
+MQ_DB2_NAME_LENGTH = 4
+MQ_DSG_NAME_LENGTH = 8
+MQ_ENTITY_NAME_LENGTH = 64
+MQ_ENV_INFO_LENGTH = 96
+MQ_IP_ADDRESS_LENGTH = 48
+MQ_LOG_CORREL_ID_LENGTH = 8
+MQ_LOG_EXTENT_NAME_LENGTH = 24
+MQ_LOG_PATH_LENGTH = 1024
+MQ_LRSN_LENGTH = 12
+MQ_ORIGIN_NAME_LENGTH = 8
+MQ_PSB_NAME_LENGTH = 8
+MQ_PST_ID_LENGTH = 8
+MQ_Q_MGR_CPF_LENGTH = 4
+MQ_RESPONSE_ID_LENGTH = 24
+MQ_RBA_LENGTH = 12
+MQ_SECURITY_PROFILE_LENGTH = 40
+MQ_SERVICE_COMPONENT_LENGTH = 48
+MQ_SUB_NAME_LENGTH = 10240
+MQ_SYSP_SERVICE_LENGTH = 32
+MQ_SYSTEM_NAME_LENGTH = 8
+MQ_TASK_NUMBER_LENGTH = 8
+MQ_TPIPE_PFX_LENGTH = 4
+MQ_UOW_ID_LENGTH = 256
+MQ_USER_DATA_LENGTH = 10240
+MQ_VOLSER_LENGTH = 6
+MQCFOP_LESS = 1
+MQCFOP_EQUAL = 2
+MQCFOP_GREATER = 4
+MQCFOP_NOT_LESS = 6
+MQCFOP_NOT_EQUAL = 5
+MQCFOP_NOT_GREATER = 3
+MQCFOP_LIKE = 18
+MQCFOP_NOT_LIKE = 21
+MQCFOP_CONTAINS = 10
+MQCFOP_EXCLUDES = 13
+MQCFOP_CONTAINS_GEN = 26
+MQCFOP_EXCLUDES_GEN = 29
+MQCFT_NONE = 0
+MQCFT_COMMAND = 1
+MQCFT_RESPONSE = 2
+MQCFT_INTEGER = 3
+MQCFT_STRING = 4
+MQCFT_INTEGER_LIST = 5
+MQCFT_STRING_LIST = 6
+MQCFT_EVENT = 7
+MQCFT_USER = 8
+MQCFT_BYTE_STRING = 9
+MQCFT_TRACE_ROUTE = 10
+MQCFT_REPORT = 12
+MQCFT_INTEGER_FILTER = 13
+MQCFT_STRING_FILTER = 14
+MQCFT_BYTE_STRING_FILTER = 15
+MQCFT_COMMAND_XR = 16
+MQCFT_XR_MSG = 17
+MQCFT_XR_ITEM = 18
+MQCFT_XR_SUMMARY = 19
+MQCFT_GROUP = 20
+MQCFT_STATISTICS = 21
+MQCFT_ACCOUNTING = 22
+MQCFT_INTEGER64 = 23
+MQCFT_INTEGER64_LIST = 25
+MQBACF_FIRST = 7001
+MQBACF_EVENT_ACCOUNTING_TOKEN = 7001
+MQBACF_EVENT_SECURITY_ID = 7002
+MQBACF_RESPONSE_SET = 7003
+MQBACF_RESPONSE_ID = 7004
+MQBACF_EXTERNAL_UOW_ID = 7005
+MQBACF_CONNECTION_ID = 7006
+MQBACF_GENERIC_CONNECTION_ID = 7007
+MQBACF_ORIGIN_UOW_ID = 7008
+MQBACF_Q_MGR_UOW_ID = 7009
+MQBACF_ACCOUNTING_TOKEN = 7010
+MQBACF_CORREL_ID = 7011
+MQBACF_GROUP_ID = 7012
+MQBACF_MSG_ID = 7013
+MQBACF_CF_LEID = 7014
+MQBACF_DESTINATION_CORREL_ID = 7015
+MQBACF_SUB_ID = 7016
+MQBACF_LAST_USED = 7016
+MQIAMO_FIRST = 701
+MQIAMO_AVG_BATCH_SIZE = 702
+MQIAMO_AVG_Q_TIME = 703
+MQIAMO_BACKOUTS = 704
+MQIAMO_BROWSES = 705
+MQIAMO_BROWSE_MAX_BYTES = 706
+MQIAMO_BROWSE_MIN_BYTES = 707
+MQIAMO_BROWSES_FAILED = 708
+MQIAMO_CLOSES = 709
+MQIAMO_COMMITS = 710
+MQIAMO_COMMITS_FAILED = 711
+MQIAMO_CONNS = 712
+MQIAMO_CONNS_MAX = 713
+MQIAMO_DISCS = 714
+MQIAMO_DISCS_IMPLICIT = 715
+MQIAMO_DISC_TYPE = 716
+MQIAMO_EXIT_TIME_AVG = 717
+MQIAMO_EXIT_TIME_MAX = 718
+MQIAMO_EXIT_TIME_MIN = 719
+MQIAMO_FULL_BATCHES = 720
+MQIAMO_GENERATED_MSGS = 721
+MQIAMO_GETS = 722
+MQIAMO_GET_MAX_BYTES = 723
+MQIAMO_GET_MIN_BYTES = 724
+MQIAMO_GETS_FAILED = 725
+MQIAMO_INCOMPLETE_BATCHES = 726
+MQIAMO_INQS = 727
+MQIAMO_MSGS = 728
+MQIAMO_NET_TIME_AVG = 729
+MQIAMO_NET_TIME_MAX = 730
+MQIAMO_NET_TIME_MIN = 731
+MQIAMO_OBJECT_COUNT = 732
+MQIAMO_OPENS = 733
+MQIAMO_PUT1S = 734
+MQIAMO_PUTS = 735
+MQIAMO_PUT_MAX_BYTES = 736
+MQIAMO_PUT_MIN_BYTES = 737
+MQIAMO_PUT_RETRIES = 738
+MQIAMO_Q_MAX_DEPTH = 739
+MQIAMO_Q_MIN_DEPTH = 740
+MQIAMO_Q_TIME_AVG = 741
+MQIAMO_Q_TIME_MAX = 742
+MQIAMO_Q_TIME_MIN = 743
+MQIAMO_SETS = 744
+MQIAMO_CONNS_FAILED = 749
+MQIAMO_OPENS_FAILED = 751
+MQIAMO_INQS_FAILED = 752
+MQIAMO_SETS_FAILED = 753
+MQIAMO_PUTS_FAILED = 754
+MQIAMO_PUT1S_FAILED = 755
+MQIAMO_CLOSES_FAILED = 757
+MQIAMO_MSGS_EXPIRED = 758
+MQIAMO_MSGS_NOT_QUEUED = 759
+MQIAMO_MSGS_PURGED = 760
+MQIAMO_SUBS_DUR = 764
+MQIAMO_SUBS_NDUR = 765
+MQIAMO_SUBS_FAILED = 766
+MQIAMO_SUBRQS = 767
+MQIAMO_SUBRQS_FAILED = 768
+MQIAMO_CBS = 769
+MQIAMO_CBS_FAILED = 770
+MQIAMO_CTLS = 771
+MQIAMO_CTLS_FAILED = 772
+MQIAMO_STATS = 773
+MQIAMO_STATS_FAILED = 774
+MQIAMO_SUB_DUR_HIGHWATER = 775
+MQIAMO_SUB_DUR_LOWWATER = 776
+MQIAMO_SUB_NDUR_HIGHWATER = 777
+MQIAMO_SUB_NDUR_LOWWATER = 778
+MQIAMO_TOPIC_PUTS = 779
+MQIAMO_TOPIC_PUTS_FAILED = 780
+MQIAMO_TOPIC_PUT1S = 781
+MQIAMO_TOPIC_PUT1S_FAILED = 782
+MQIAMO_PUBLISH_MSG_COUNT = 784
+MQIAMO_UNSUBS_DUR = 786
+MQIAMO_UNSUBS_NDUR = 787
+MQIAMO_UNSUBS_FAILED = 788
+MQIAMO_LAST_USED = 788
+MQIAMO64_AVG_Q_TIME = 703
+MQIAMO64_Q_TIME_AVG = 741
+MQIAMO64_Q_TIME_MAX = 742
+MQIAMO64_Q_TIME_MIN = 743
+MQIAMO64_BROWSE_BYTES = 745
+MQIAMO64_BYTES = 746
+MQIAMO64_GET_BYTES = 747
+MQIAMO64_PUT_BYTES = 748
+MQIAMO64_TOPIC_PUT_BYTES = 783
+MQIAMO64_PUBLISH_MSG_BYTES = 785
+MQIACF_FIRST = 1001
+MQIACF_Q_MGR_ATTRS = 1001
+MQIACF_Q_ATTRS = 1002
+MQIACF_PROCESS_ATTRS = 1003
+MQIACF_NAMELIST_ATTRS = 1004
+MQIACF_FORCE = 1005
+MQIACF_REPLACE = 1006
+MQIACF_PURGE = 1007
+MQIACF_QUIESCE = 1008
+MQIACF_MODE = 1008
+MQIACF_ALL = 1009
+MQIACF_EVENT_APPL_TYPE = 1010
+MQIACF_EVENT_ORIGIN = 1011
+MQIACF_PARAMETER_ID = 1012
+MQIACF_ERROR_ID = 1013
+MQIACF_ERROR_IDENTIFIER = 1013
+MQIACF_SELECTOR = 1014
+MQIACF_CHANNEL_ATTRS = 1015
+MQIACF_OBJECT_TYPE = 1016
+MQIACF_ESCAPE_TYPE = 1017
+MQIACF_ERROR_OFFSET = 1018
+MQIACF_AUTH_INFO_ATTRS = 1019
+MQIACF_REASON_QUALIFIER = 1020
+MQIACF_COMMAND = 1021
+MQIACF_OPEN_OPTIONS = 1022
+MQIACF_OPEN_TYPE = 1023
+MQIACF_PROCESS_ID = 1024
+MQIACF_THREAD_ID = 1025
+MQIACF_Q_STATUS_ATTRS = 1026
+MQIACF_UNCOMMITTED_MSGS = 1027
+MQIACF_HANDLE_STATE = 1028
+MQIACF_AUX_ERROR_DATA_INT_1 = 1070
+MQIACF_AUX_ERROR_DATA_INT_2 = 1071
+MQIACF_CONV_REASON_CODE = 1072
+MQIACF_BRIDGE_TYPE = 1073
+MQIACF_INQUIRY = 1074
+MQIACF_WAIT_INTERVAL = 1075
+MQIACF_OPTIONS = 1076
+MQIACF_BROKER_OPTIONS = 1077
+MQIACF_REFRESH_TYPE = 1078
+MQIACF_SEQUENCE_NUMBER = 1079
+MQIACF_INTEGER_DATA = 1080
+MQIACF_REGISTRATION_OPTIONS = 1081
+MQIACF_PUBLICATION_OPTIONS = 1082
+MQIACF_CLUSTER_INFO = 1083
+MQIACF_Q_MGR_DEFINITION_TYPE = 1084
+MQIACF_Q_MGR_TYPE = 1085
+MQIACF_ACTION = 1086
+MQIACF_SUSPEND = 1087
+MQIACF_BROKER_COUNT = 1088
+MQIACF_APPL_COUNT = 1089
+MQIACF_ANONYMOUS_COUNT = 1090
+MQIACF_REG_REG_OPTIONS = 1091
+MQIACF_DELETE_OPTIONS = 1092
+MQIACF_CLUSTER_Q_MGR_ATTRS = 1093
+MQIACF_REFRESH_INTERVAL = 1094
+MQIACF_REFRESH_REPOSITORY = 1095
+MQIACF_REMOVE_QUEUES = 1096
+MQIACF_OPEN_INPUT_TYPE = 1098
+MQIACF_OPEN_OUTPUT = 1099
+MQIACF_OPEN_SET = 1100
+MQIACF_OPEN_INQUIRE = 1101
+MQIACF_OPEN_BROWSE = 1102
+MQIACF_Q_STATUS_TYPE = 1103
+MQIACF_Q_HANDLE = 1104
+MQIACF_Q_STATUS = 1105
+MQIACF_SECURITY_TYPE = 1106
+MQIACF_CONNECTION_ATTRS = 1107
+MQIACF_CONNECT_OPTIONS = 1108
+MQIACF_CONN_INFO_TYPE = 1110
+MQIACF_CONN_INFO_CONN = 1111
+MQIACF_CONN_INFO_HANDLE = 1112
+MQIACF_CONN_INFO_ALL = 1113
+MQIACF_AUTH_PROFILE_ATTRS = 1114
+MQIACF_AUTHORIZATION_LIST = 1115
+MQIACF_AUTH_ADD_AUTHS = 1116
+MQIACF_AUTH_REMOVE_AUTHS = 1117
+MQIACF_ENTITY_TYPE = 1118
+MQIACF_COMMAND_INFO = 1120
+MQIACF_CMDSCOPE_Q_MGR_COUNT = 1121
+MQIACF_Q_MGR_SYSTEM = 1122
+MQIACF_Q_MGR_EVENT = 1123
+MQIACF_Q_MGR_DQM = 1124
+MQIACF_Q_MGR_CLUSTER = 1125
+MQIACF_QSG_DISPS = 1126
+MQIACF_UOW_STATE = 1128
+MQIACF_SECURITY_ITEM = 1129
+MQIACF_CF_STRUC_STATUS = 1130
+MQIACF_UOW_TYPE = 1132
+MQIACF_CF_STRUC_ATTRS = 1133
+MQIACF_EXCLUDE_INTERVAL = 1134
+MQIACF_CF_STATUS_TYPE = 1135
+MQIACF_CF_STATUS_SUMMARY = 1136
+MQIACF_CF_STATUS_CONNECT = 1137
+MQIACF_CF_STATUS_BACKUP = 1138
+MQIACF_CF_STRUC_TYPE = 1139
+MQIACF_CF_STRUC_SIZE_MAX = 1140
+MQIACF_CF_STRUC_SIZE_USED = 1141
+MQIACF_CF_STRUC_ENTRIES_MAX = 1142
+MQIACF_CF_STRUC_ENTRIES_USED = 1143
+MQIACF_CF_STRUC_BACKUP_SIZE = 1144
+MQIACF_MOVE_TYPE = 1145
+MQIACF_MOVE_TYPE_MOVE = 1146
+MQIACF_MOVE_TYPE_ADD = 1147
+MQIACF_Q_MGR_NUMBER = 1148
+MQIACF_Q_MGR_STATUS = 1149
+MQIACF_DB2_CONN_STATUS = 1150
+MQIACF_SECURITY_ATTRS = 1151
+MQIACF_SECURITY_TIMEOUT = 1152
+MQIACF_SECURITY_INTERVAL = 1153
+MQIACF_SECURITY_SWITCH = 1154
+MQIACF_SECURITY_SETTING = 1155
+MQIACF_STORAGE_CLASS_ATTRS = 1156
+MQIACF_USAGE_TYPE = 1157
+MQIACF_BUFFER_POOL_ID = 1158
+MQIACF_USAGE_TOTAL_PAGES = 1159
+MQIACF_USAGE_UNUSED_PAGES = 1160
+MQIACF_USAGE_PERSIST_PAGES = 1161
+MQIACF_USAGE_NONPERSIST_PAGES = 1162
+MQIACF_USAGE_RESTART_EXTENTS = 1163
+MQIACF_USAGE_EXPAND_COUNT = 1164
+MQIACF_PAGESET_STATUS = 1165
+MQIACF_USAGE_TOTAL_BUFFERS = 1166
+MQIACF_USAGE_DATA_SET_TYPE = 1167
+MQIACF_USAGE_PAGESET = 1168
+MQIACF_USAGE_DATA_SET = 1169
+MQIACF_USAGE_BUFFER_POOL = 1170
+MQIACF_MOVE_COUNT = 1171
+MQIACF_EXPIRY_Q_COUNT = 1172
+MQIACF_CONFIGURATION_OBJECTS = 1173
+MQIACF_CONFIGURATION_EVENTS = 1174
+MQIACF_SYSP_TYPE = 1175
+MQIACF_SYSP_DEALLOC_INTERVAL = 1176
+MQIACF_SYSP_MAX_ARCHIVE = 1177
+MQIACF_SYSP_MAX_READ_TAPES = 1178
+MQIACF_SYSP_IN_BUFFER_SIZE = 1179
+MQIACF_SYSP_OUT_BUFFER_SIZE = 1180
+MQIACF_SYSP_OUT_BUFFER_COUNT = 1181
+MQIACF_SYSP_ARCHIVE = 1182
+MQIACF_SYSP_DUAL_ACTIVE = 1183
+MQIACF_SYSP_DUAL_ARCHIVE = 1184
+MQIACF_SYSP_DUAL_BSDS = 1185
+MQIACF_SYSP_MAX_CONNS = 1186
+MQIACF_SYSP_MAX_CONNS_FORE = 1187
+MQIACF_SYSP_MAX_CONNS_BACK = 1188
+MQIACF_SYSP_EXIT_INTERVAL = 1189
+MQIACF_SYSP_EXIT_TASKS = 1190
+MQIACF_SYSP_CHKPOINT_COUNT = 1191
+MQIACF_SYSP_OTMA_INTERVAL = 1192
+MQIACF_SYSP_Q_INDEX_DEFER = 1193
+MQIACF_SYSP_DB2_TASKS = 1194
+MQIACF_SYSP_RESLEVEL_AUDIT = 1195
+MQIACF_SYSP_ROUTING_CODE = 1196
+MQIACF_SYSP_SMF_ACCOUNTING = 1197
+MQIACF_SYSP_SMF_STATS = 1198
+MQIACF_SYSP_SMF_INTERVAL = 1199
+MQIACF_SYSP_TRACE_CLASS = 1200
+MQIACF_SYSP_TRACE_SIZE = 1201
+MQIACF_SYSP_WLM_INTERVAL = 1202
+MQIACF_SYSP_ALLOC_UNIT = 1203
+MQIACF_SYSP_ARCHIVE_RETAIN = 1204
+MQIACF_SYSP_ARCHIVE_WTOR = 1205
+MQIACF_SYSP_BLOCK_SIZE = 1206
+MQIACF_SYSP_CATALOG = 1207
+MQIACF_SYSP_COMPACT = 1208
+MQIACF_SYSP_ALLOC_PRIMARY = 1209
+MQIACF_SYSP_ALLOC_SECONDARY = 1210
+MQIACF_SYSP_PROTECT = 1211
+MQIACF_SYSP_QUIESCE_INTERVAL = 1212
+MQIACF_SYSP_TIMESTAMP = 1213
+MQIACF_SYSP_UNIT_ADDRESS = 1214
+MQIACF_SYSP_UNIT_STATUS = 1215
+MQIACF_SYSP_LOG_COPY = 1216
+MQIACF_SYSP_LOG_USED = 1217
+MQIACF_SYSP_LOG_SUSPEND = 1218
+MQIACF_SYSP_OFFLOAD_STATUS = 1219
+MQIACF_SYSP_TOTAL_LOGS = 1220
+MQIACF_SYSP_FULL_LOGS = 1221
+MQIACF_LISTENER_ATTRS = 1222
+MQIACF_LISTENER_STATUS_ATTRS = 1223
+MQIACF_SERVICE_ATTRS = 1224
+MQIACF_SERVICE_STATUS_ATTRS = 1225
+MQIACF_Q_TIME_INDICATOR = 1226
+MQIACF_OLDEST_MSG_AGE = 1227
+MQIACF_AUTH_OPTIONS = 1228
+MQIACF_Q_MGR_STATUS_ATTRS = 1229
+MQIACF_CONNECTION_COUNT = 1230
+MQIACF_Q_MGR_FACILITY = 1231
+MQIACF_CHINIT_STATUS = 1232
+MQIACF_CMD_SERVER_STATUS = 1233
+MQIACF_ROUTE_DETAIL = 1234
+MQIACF_RECORDED_ACTIVITIES = 1235
+MQIACF_MAX_ACTIVITIES = 1236
+MQIACF_DISCONTINUITY_COUNT = 1237
+MQIACF_ROUTE_ACCUMULATION = 1238
+MQIACF_ROUTE_DELIVERY = 1239
+MQIACF_OPERATION_TYPE = 1240
+MQIACF_BACKOUT_COUNT = 1241
+MQIACF_COMP_CODE = 1242
+MQIACF_ENCODING = 1243
+MQIACF_EXPIRY = 1244
+MQIACF_FEEDBACK = 1245
+MQIACF_MSG_FLAGS = 1247
+MQIACF_MSG_LENGTH = 1248
+MQIACF_MSG_TYPE = 1249
+MQIACF_OFFSET = 1250
+MQIACF_ORIGINAL_LENGTH = 1251
+MQIACF_PERSISTENCE = 1252
+MQIACF_PRIORITY = 1253
+MQIACF_REASON_CODE = 1254
+MQIACF_REPORT = 1255
+MQIACF_VERSION = 1256
+MQIACF_UNRECORDED_ACTIVITIES = 1257
+MQIACF_MONITORING = 1258
+MQIACF_ROUTE_FORWARDING = 1259
+MQIACF_SERVICE_STATUS = 1260
+MQIACF_Q_TYPES = 1261
+MQIACF_USER_ID_SUPPORT = 1262
+MQIACF_INTERFACE_VERSION = 1263
+MQIACF_AUTH_SERVICE_ATTRS = 1264
+MQIACF_USAGE_EXPAND_TYPE = 1265
+MQIACF_SYSP_CLUSTER_CACHE = 1266
+MQIACF_SYSP_DB2_BLOB_TASKS = 1267
+MQIACF_SYSP_WLM_INT_UNITS = 1268
+MQIACF_TOPIC_ATTRS = 1269
+MQIACF_PUBSUB_PROPERTIES = 1271
+MQIACF_DESTINATION_CLASS = 1273
+MQIACF_DURABLE_SUBSCRIPTION = 1274
+MQIACF_SUBSCRIPTION_SCOPE = 1275
+MQIACF_VARIABLE_USER_ID = 1277
+MQIACF_REQUEST_ONLY = 1280
+MQIACF_PUB_PRIORITY = 1283
+MQIACF_SUB_ATTRS = 1287
+MQIACF_WILDCARD_SCHEMA = 1288
+MQIACF_SUB_TYPE = 1289
+MQIACF_MESSAGE_COUNT = 1290
+MQIACF_Q_MGR_PUBSUB = 1291
+MQIACF_Q_MGR_VERSION = 1292
+MQIACF_SUB_STATUS_ATTRS = 1294
+MQIACF_TOPIC_STATUS = 1295
+MQIACF_TOPIC_SUB = 1296
+MQIACF_TOPIC_PUB = 1297
+MQIACF_RETAINED_PUBLICATION = 1300
+MQIACF_TOPIC_STATUS_ATTRS = 1301
+MQIACF_TOPIC_STATUS_TYPE = 1302
+MQIACF_SUB_OPTIONS = 1303
+MQIACF_PUBLISH_COUNT = 1304
+MQIACF_CLEAR_TYPE = 1305
+MQIACF_CLEAR_SCOPE = 1306
+MQIACF_SUB_LEVEL = 1307
+MQIACF_ASYNC_STATE = 1308
+MQIACF_SUB_SUMMARY = 1309
+MQIACF_OBSOLETE_MSGS = 1310
+MQIACF_PUBSUB_STATUS = 1311
+MQIACF_PS_STATUS_TYPE = 1314
+MQIACF_PUBSUB_STATUS_ATTRS = 1318
+MQIACF_LAST_USED = 1318
+MQIACH_FIRST = 1501
+MQIACH_XMIT_PROTOCOL_TYPE = 1501
+MQIACH_BATCH_SIZE = 1502
+MQIACH_DISC_INTERVAL = 1503
+MQIACH_SHORT_TIMER = 1504
+MQIACH_SHORT_RETRY = 1505
+MQIACH_LONG_TIMER = 1506
+MQIACH_LONG_RETRY = 1507
+MQIACH_PUT_AUTHORITY = 1508
+MQIACH_SEQUENCE_NUMBER_WRAP = 1509
+MQIACH_MAX_MSG_LENGTH = 1510
+MQIACH_CHANNEL_TYPE = 1511
+MQIACH_DATA_COUNT = 1512
+MQIACH_NAME_COUNT = 1513
+MQIACH_MSG_SEQUENCE_NUMBER = 1514
+MQIACH_DATA_CONVERSION = 1515
+MQIACH_IN_DOUBT = 1516
+MQIACH_MCA_TYPE = 1517
+MQIACH_SESSION_COUNT = 1518
+MQIACH_ADAPTER = 1519
+MQIACH_COMMAND_COUNT = 1520
+MQIACH_SOCKET = 1521
+MQIACH_PORT = 1522
+MQIACH_CHANNEL_INSTANCE_TYPE = 1523
+MQIACH_CHANNEL_INSTANCE_ATTRS = 1524
+MQIACH_CHANNEL_ERROR_DATA = 1525
+MQIACH_CHANNEL_TABLE = 1526
+MQIACH_CHANNEL_STATUS = 1527
+MQIACH_INDOUBT_STATUS = 1528
+MQIACH_LAST_SEQ_NUMBER = 1529
+MQIACH_LAST_SEQUENCE_NUMBER = 1529
+MQIACH_CURRENT_MSGS = 1531
+MQIACH_CURRENT_SEQ_NUMBER = 1532
+MQIACH_CURRENT_SEQUENCE_NUMBER = 1532
+MQIACH_SSL_RETURN_CODE = 1533
+MQIACH_MSGS = 1534
+MQIACH_BYTES_SENT = 1535
+MQIACH_BYTES_RCVD = 1536
+MQIACH_BYTES_RECEIVED = 1536
+MQIACH_BATCHES = 1537
+MQIACH_BUFFERS_SENT = 1538
+MQIACH_BUFFERS_RCVD = 1539
+MQIACH_BUFFERS_RECEIVED = 1539
+MQIACH_LONG_RETRIES_LEFT = 1540
+MQIACH_SHORT_RETRIES_LEFT = 1541
+MQIACH_MCA_STATUS = 1542
+MQIACH_STOP_REQUESTED = 1543
+MQIACH_MR_COUNT = 1544
+MQIACH_MR_INTERVAL = 1545
+MQIACH_NPM_SPEED = 1562
+MQIACH_HB_INTERVAL = 1563
+MQIACH_BATCH_INTERVAL = 1564
+MQIACH_NETWORK_PRIORITY = 1565
+MQIACH_KEEP_ALIVE_INTERVAL = 1566
+MQIACH_BATCH_HB = 1567
+MQIACH_SSL_CLIENT_AUTH = 1568
+MQIACH_ALLOC_RETRY = 1570
+MQIACH_ALLOC_FAST_TIMER = 1571
+MQIACH_ALLOC_SLOW_TIMER = 1572
+MQIACH_DISC_RETRY = 1573
+MQIACH_PORT_NUMBER = 1574
+MQIACH_HDR_COMPRESSION = 1575
+MQIACH_MSG_COMPRESSION = 1576
+MQIACH_CLWL_CHANNEL_RANK = 1577
+MQIACH_CLWL_CHANNEL_PRIORITY = 1578
+MQIACH_CLWL_CHANNEL_WEIGHT = 1579
+MQIACH_CHANNEL_DISP = 1580
+MQIACH_INBOUND_DISP = 1581
+MQIACH_CHANNEL_TYPES = 1582
+MQIACH_ADAPS_STARTED = 1583
+MQIACH_ADAPS_MAX = 1584
+MQIACH_DISPS_STARTED = 1585
+MQIACH_DISPS_MAX = 1586
+MQIACH_SSLTASKS_STARTED = 1587
+MQIACH_SSLTASKS_MAX = 1588
+MQIACH_CURRENT_CHL = 1589
+MQIACH_CURRENT_CHL_MAX = 1590
+MQIACH_CURRENT_CHL_TCP = 1591
+MQIACH_CURRENT_CHL_LU62 = 1592
+MQIACH_ACTIVE_CHL = 1593
+MQIACH_ACTIVE_CHL_MAX = 1594
+MQIACH_ACTIVE_CHL_PAUSED = 1595
+MQIACH_ACTIVE_CHL_STARTED = 1596
+MQIACH_ACTIVE_CHL_STOPPED = 1597
+MQIACH_ACTIVE_CHL_RETRY = 1598
+MQIACH_LISTENER_STATUS = 1599
+MQIACH_SHARED_CHL_RESTART = 1600
+MQIACH_LISTENER_CONTROL = 1601
+MQIACH_BACKLOG = 1602
+MQIACH_XMITQ_TIME_INDICATOR = 1604
+MQIACH_NETWORK_TIME_INDICATOR = 1605
+MQIACH_EXIT_TIME_INDICATOR = 1606
+MQIACH_BATCH_SIZE_INDICATOR = 1607
+MQIACH_XMITQ_MSGS_AVAILABLE = 1608
+MQIACH_CHANNEL_SUBSTATE = 1609
+MQIACH_SSL_KEY_RESETS = 1610
+MQIACH_COMPRESSION_RATE = 1611
+MQIACH_COMPRESSION_TIME = 1612
+MQIACH_MAX_XMIT_SIZE = 1613
+MQIACH_DEF_CHANNEL_DISP = 1614
+MQIACH_SHARING_CONVERSATIONS = 1615
+MQIACH_MAX_SHARING_CONVS = 1616
+MQIACH_CURRENT_SHARING_CONVS = 1617
+MQIACH_MAX_INSTANCES = 1618
+MQIACH_MAX_INSTS_PER_CLIENT = 1619
+MQIACH_CLIENT_CHANNEL_WEIGHT = 1620
+MQIACH_CONNECTION_AFFINITY = 1621
+MQIACH_LAST_USED = 1621
+MQCAMO_FIRST = 2701
+MQCAMO_CLOSE_DATE = 2701
+MQCAMO_CLOSE_TIME = 2702
+MQCAMO_CONN_DATE = 2703
+MQCAMO_CONN_TIME = 2704
+MQCAMO_DISC_DATE = 2705
+MQCAMO_DISC_TIME = 2706
+MQCAMO_END_DATE = 2707
+MQCAMO_END_TIME = 2708
+MQCAMO_OPEN_DATE = 2709
+MQCAMO_OPEN_TIME = 2710
+MQCAMO_START_DATE = 2711
+MQCAMO_START_TIME = 2712
+MQCAMO_LAST_USED = 2712
+MQCACF_FIRST = 3001
+MQCACF_FROM_Q_NAME = 3001
+MQCACF_TO_Q_NAME = 3002
+MQCACF_FROM_PROCESS_NAME = 3003
+MQCACF_TO_PROCESS_NAME = 3004
+MQCACF_FROM_NAMELIST_NAME = 3005
+MQCACF_TO_NAMELIST_NAME = 3006
+MQCACF_FROM_CHANNEL_NAME = 3007
+MQCACF_TO_CHANNEL_NAME = 3008
+MQCACF_FROM_AUTH_INFO_NAME = 3009
+MQCACF_TO_AUTH_INFO_NAME = 3010
+MQCACF_Q_NAMES = 3011
+MQCACF_PROCESS_NAMES = 3012
+MQCACF_NAMELIST_NAMES = 3013
+MQCACF_ESCAPE_TEXT = 3014
+MQCACF_LOCAL_Q_NAMES = 3015
+MQCACF_MODEL_Q_NAMES = 3016
+MQCACF_ALIAS_Q_NAMES = 3017
+MQCACF_REMOTE_Q_NAMES = 3018
+MQCACF_SENDER_CHANNEL_NAMES = 3019
+MQCACF_SERVER_CHANNEL_NAMES = 3020
+MQCACF_REQUESTER_CHANNEL_NAMES = 3021
+MQCACF_RECEIVER_CHANNEL_NAMES = 3022
+MQCACF_OBJECT_Q_MGR_NAME = 3023
+MQCACF_APPL_NAME = 3024
+MQCACF_USER_IDENTIFIER = 3025
+MQCACF_AUX_ERROR_DATA_STR_1 = 3026
+MQCACF_AUX_ERROR_DATA_STR_2 = 3027
+MQCACF_AUX_ERROR_DATA_STR_3 = 3028
+MQCACF_BRIDGE_NAME = 3029
+MQCACF_STREAM_NAME = 3030
+MQCACF_TOPIC = 3031
+MQCACF_PARENT_Q_MGR_NAME = 3032
+MQCACF_CORREL_ID = 3033
+MQCACF_PUBLISH_TIMESTAMP = 3034
+MQCACF_STRING_DATA = 3035
+MQCACF_SUPPORTED_STREAM_NAME = 3036
+MQCACF_REG_TOPIC = 3037
+MQCACF_REG_TIME = 3038
+MQCACF_REG_USER_ID = 3039
+MQCACF_CHILD_Q_MGR_NAME = 3040
+MQCACF_REG_STREAM_NAME = 3041
+MQCACF_REG_Q_MGR_NAME = 3042
+MQCACF_REG_Q_NAME = 3043
+MQCACF_REG_CORREL_ID = 3044
+MQCACF_EVENT_USER_ID = 3045
+MQCACF_OBJECT_NAME = 3046
+MQCACF_EVENT_Q_MGR = 3047
+MQCACF_AUTH_INFO_NAMES = 3048
+MQCACF_EVENT_APPL_IDENTITY = 3049
+MQCACF_EVENT_APPL_NAME = 3050
+MQCACF_EVENT_APPL_ORIGIN = 3051
+MQCACF_SUBSCRIPTION_NAME = 3052
+MQCACF_REG_SUB_NAME = 3053
+MQCACF_SUBSCRIPTION_IDENTITY = 3054
+MQCACF_REG_SUB_IDENTITY = 3055
+MQCACF_SUBSCRIPTION_USER_DATA = 3056
+MQCACF_REG_SUB_USER_DATA = 3057
+MQCACF_APPL_TAG = 3058
+MQCACF_DATA_SET_NAME = 3059
+MQCACF_UOW_START_DATE = 3060
+MQCACF_UOW_START_TIME = 3061
+MQCACF_UOW_LOG_START_DATE = 3062
+MQCACF_UOW_LOG_START_TIME = 3063
+MQCACF_UOW_LOG_EXTENT_NAME = 3064
+MQCACF_PRINCIPAL_ENTITY_NAMES = 3065
+MQCACF_GROUP_ENTITY_NAMES = 3066
+MQCACF_AUTH_PROFILE_NAME = 3067
+MQCACF_ENTITY_NAME = 3068
+MQCACF_SERVICE_COMPONENT = 3069
+MQCACF_RESPONSE_Q_MGR_NAME = 3070
+MQCACF_CURRENT_LOG_EXTENT_NAME = 3071
+MQCACF_RESTART_LOG_EXTENT_NAME = 3072
+MQCACF_MEDIA_LOG_EXTENT_NAME = 3073
+MQCACF_LOG_PATH = 3074
+MQCACF_COMMAND_MQSC = 3075
+MQCACF_Q_MGR_CPF = 3076
+MQCACF_USAGE_LOG_RBA = 3078
+MQCACF_USAGE_LOG_LRSN = 3079
+MQCACF_COMMAND_SCOPE = 3080
+MQCACF_ASID = 3081
+MQCACF_PSB_NAME = 3082
+MQCACF_PST_ID = 3083
+MQCACF_TASK_NUMBER = 3084
+MQCACF_TRANSACTION_ID = 3085
+MQCACF_Q_MGR_UOW_ID = 3086
+MQCACF_ORIGIN_NAME = 3088
+MQCACF_ENV_INFO = 3089
+MQCACF_SECURITY_PROFILE = 3090
+MQCACF_CONFIGURATION_DATE = 3091
+MQCACF_CONFIGURATION_TIME = 3092
+MQCACF_FROM_CF_STRUC_NAME = 3093
+MQCACF_TO_CF_STRUC_NAME = 3094
+MQCACF_CF_STRUC_NAMES = 3095
+MQCACF_FAIL_DATE = 3096
+MQCACF_FAIL_TIME = 3097
+MQCACF_BACKUP_DATE = 3098
+MQCACF_BACKUP_TIME = 3099
+MQCACF_SYSTEM_NAME = 3100
+MQCACF_CF_STRUC_BACKUP_START = 3101
+MQCACF_CF_STRUC_BACKUP_END = 3102
+MQCACF_CF_STRUC_LOG_Q_MGRS = 3103
+MQCACF_FROM_STORAGE_CLASS = 3104
+MQCACF_TO_STORAGE_CLASS = 3105
+MQCACF_STORAGE_CLASS_NAMES = 3106
+MQCACF_DSG_NAME = 3108
+MQCACF_DB2_NAME = 3109
+MQCACF_SYSP_CMD_USER_ID = 3110
+MQCACF_SYSP_OTMA_GROUP = 3111
+MQCACF_SYSP_OTMA_MEMBER = 3112
+MQCACF_SYSP_OTMA_DRU_EXIT = 3113
+MQCACF_SYSP_OTMA_TPIPE_PFX = 3114
+MQCACF_SYSP_ARCHIVE_PFX1 = 3115
+MQCACF_SYSP_ARCHIVE_UNIT1 = 3116
+MQCACF_SYSP_LOG_CORREL_ID = 3117
+MQCACF_SYSP_UNIT_VOLSER = 3118
+MQCACF_SYSP_Q_MGR_TIME = 3119
+MQCACF_SYSP_Q_MGR_DATE = 3120
+MQCACF_SYSP_Q_MGR_RBA = 3121
+MQCACF_SYSP_LOG_RBA = 3122
+MQCACF_SYSP_SERVICE = 3123
+MQCACF_FROM_LISTENER_NAME = 3124
+MQCACF_TO_LISTENER_NAME = 3125
+MQCACF_FROM_SERVICE_NAME = 3126
+MQCACF_TO_SERVICE_NAME = 3127
+MQCACF_LAST_PUT_DATE = 3128
+MQCACF_LAST_PUT_TIME = 3129
+MQCACF_LAST_GET_DATE = 3130
+MQCACF_LAST_GET_TIME = 3131
+MQCACF_OPERATION_DATE = 3132
+MQCACF_OPERATION_TIME = 3133
+MQCACF_ACTIVITY_DESC = 3134
+MQCACF_APPL_IDENTITY_DATA = 3135
+MQCACF_APPL_ORIGIN_DATA = 3136
+MQCACF_PUT_DATE = 3137
+MQCACF_PUT_TIME = 3138
+MQCACF_REPLY_TO_Q = 3139
+MQCACF_REPLY_TO_Q_MGR = 3140
+MQCACF_RESOLVED_Q_NAME = 3141
+MQCACF_STRUC_ID = 3142
+MQCACF_VALUE_NAME = 3143
+MQCACF_SERVICE_START_DATE = 3144
+MQCACF_SERVICE_START_TIME = 3145
+MQCACF_SYSP_OFFLINE_RBA = 3146
+MQCACF_SYSP_ARCHIVE_PFX2 = 3147
+MQCACF_SYSP_ARCHIVE_UNIT2 = 3148
+MQCACF_TO_TOPIC_NAME = 3149
+MQCACF_FROM_TOPIC_NAME = 3150
+MQCACF_TOPIC_NAMES = 3151
+MQCACF_SUB_NAME = 3152
+MQCACF_DESTINATION_Q_MGR = 3153
+MQCACF_DESTINATION = 3154
+MQCACF_SUB_USER_ID = 3156
+MQCACF_SUB_USER_DATA = 3159
+MQCACF_SUB_SELECTOR = 3160
+MQCACF_LAST_PUB_DATE = 3161
+MQCACF_LAST_PUB_TIME = 3162
+MQCACF_FROM_SUB_NAME = 3163
+MQCACF_TO_SUB_NAME = 3164
+MQCACF_LAST_MSG_TIME = 3167
+MQCACF_LAST_MSG_DATE = 3168
+MQCACF_SUBSCRIPTION_POINT = 3169
+MQCACF_FILTER = 3170
+MQCACF_NONE = 3171
+MQCACF_ADMIN_TOPIC_NAMES = 3172
+MQCACF_LAST_USED = 3172
+MQCACH_FIRST = 3501
+MQCACH_CHANNEL_NAME = 3501
+MQCACH_DESC = 3502
+MQCACH_MODE_NAME = 3503
+MQCACH_TP_NAME = 3504
+MQCACH_XMIT_Q_NAME = 3505
+MQCACH_CONNECTION_NAME = 3506
+MQCACH_MCA_NAME = 3507
+MQCACH_SEC_EXIT_NAME = 3508
+MQCACH_MSG_EXIT_NAME = 3509
+MQCACH_SEND_EXIT_NAME = 3510
+MQCACH_RCV_EXIT_NAME = 3511
+MQCACH_CHANNEL_NAMES = 3512
+MQCACH_SEC_EXIT_USER_DATA = 3513
+MQCACH_MSG_EXIT_USER_DATA = 3514
+MQCACH_SEND_EXIT_USER_DATA = 3515
+MQCACH_RCV_EXIT_USER_DATA = 3516
+MQCACH_USER_ID = 3517
+MQCACH_PASSWORD = 3518
+MQCACH_LOCAL_ADDRESS = 3520
+MQCACH_LOCAL_NAME = 3521
+MQCACH_LAST_MSG_TIME = 3524
+MQCACH_LAST_MSG_DATE = 3525
+MQCACH_MCA_USER_ID = 3527
+MQCACH_CHANNEL_START_TIME = 3528
+MQCACH_CHANNEL_START_DATE = 3529
+MQCACH_MCA_JOB_NAME = 3530
+MQCACH_LAST_LUWID = 3531
+MQCACH_CURRENT_LUWID = 3532
+MQCACH_FORMAT_NAME = 3533
+MQCACH_MR_EXIT_NAME = 3534
+MQCACH_MR_EXIT_USER_DATA = 3535
+MQCACH_SSL_CIPHER_SPEC = 3544
+MQCACH_SSL_PEER_NAME = 3545
+MQCACH_SSL_HANDSHAKE_STAGE = 3546
+MQCACH_SSL_SHORT_PEER_NAME = 3547
+MQCACH_REMOTE_APPL_TAG = 3548
+MQCACH_SSL_CERT_USER_ID = 3549
+MQCACH_SSL_CERT_ISSUER_NAME = 3550
+MQCACH_LU_NAME = 3551
+MQCACH_IP_ADDRESS = 3552
+MQCACH_TCP_NAME = 3553
+MQCACH_LISTENER_NAME = 3554
+MQCACH_LISTENER_DESC = 3555
+MQCACH_LISTENER_START_DATE = 3556
+MQCACH_LISTENER_START_TIME = 3557
+MQCACH_SSL_KEY_RESET_DATE = 3558
+MQCACH_SSL_KEY_RESET_TIME = 3559
+MQCACH_LAST_USED = 3559
+MQGACF_FIRST = 8001
+MQGACF_COMMAND_CONTEXT = 8001
+MQGACF_COMMAND_DATA = 8002
+MQGACF_TRACE_ROUTE = 8003
+MQGACF_OPERATION = 8004
+MQGACF_ACTIVITY = 8005
+MQGACF_EMBEDDED_MQMD = 8006
+MQGACF_MESSAGE = 8007
+MQGACF_MQMD = 8008
+MQGACF_VALUE_NAMING = 8009
+MQGACF_Q_ACCOUNTING_DATA = 8010
+MQGACF_Q_STATISTICS_DATA = 8011
+MQGACF_CHL_STATISTICS_DATA = 8012
+MQGACF_LAST_USED = 8012
+MQACT_FORCE_REMOVE = 1
+MQACT_ADVANCE_LOG = 2
+MQACT_COLLECT_STATISTICS = 3
+MQACT_PUBSUB = 4
+MQAS_NONE = 0
+MQAS_STARTED = 1
+MQAS_START_WAIT = 2
+MQAS_STOPPED = 3
+MQAS_SUSPENDED = 4
+MQAS_SUSPENDED_TEMPORARY = 5
+MQAS_ACTIVE = 6
+MQAS_INACTIVE = 7
+MQAUTH_NONE = 0
+MQAUTH_ALT_USER_AUTHORITY = 1
+MQAUTH_BROWSE = 2
+MQAUTH_CHANGE = 3
+MQAUTH_CLEAR = 4
+MQAUTH_CONNECT = 5
+MQAUTH_CREATE = 6
+MQAUTH_DELETE = 7
+MQAUTH_DISPLAY = 8
+MQAUTH_INPUT = 9
+MQAUTH_INQUIRE = 10
+MQAUTH_OUTPUT = 11
+MQAUTH_PASS_ALL_CONTEXT = 12
+MQAUTH_PASS_IDENTITY_CONTEXT = 13
+MQAUTH_SET = 14
+MQAUTH_SET_ALL_CONTEXT = 15
+MQAUTH_SET_IDENTITY_CONTEXT = 16
+MQAUTH_CONTROL = 17
+MQAUTH_CONTROL_EXTENDED = 18
+MQAUTH_PUBLISH = 19
+MQAUTH_SUBSCRIBE = 20
+MQAUTH_RESUME = 21
+MQAUTHOPT_CUMULATIVE = 0x00000100
+MQAUTHOPT_ENTITY_EXPLICIT = 0x00000001
+MQAUTHOPT_ENTITY_SET = 0x00000002
+MQAUTHOPT_NAME_ALL_MATCHING = 0x00000020
+MQAUTHOPT_NAME_AS_WILDCARD = 0x00000040
+MQAUTHOPT_NAME_EXPLICIT = 0x00000010
+MQBT_OTMA = 1
+MQCFO_REFRESH_REPOSITORY_YES = 1
+MQCFO_REFRESH_REPOSITORY_NO = 0
+MQCFO_REMOVE_QUEUES_YES = 1
+MQCFO_REMOVE_QUEUES_NO = 0
+MQCFSTATUS_NOT_FOUND = 0
+MQCFSTATUS_ACTIVE = 1
+MQCFSTATUS_IN_RECOVER = 2
+MQCFSTATUS_IN_BACKUP = 3
+MQCFSTATUS_FAILED = 4
+MQCFSTATUS_NONE = 5
+MQCFSTATUS_UNKNOWN = 6
+MQCFSTATUS_ADMIN_INCOMPLETE = 20
+MQCFSTATUS_NEVER_USED = 21
+MQCFSTATUS_NO_BACKUP = 22
+MQCFSTATUS_NOT_FAILED = 23
+MQCFSTATUS_NOT_RECOVERABLE = 24
+MQCFSTATUS_XES_ERROR = 25
+MQCFTYPE_APPL = 0
+MQCFTYPE_ADMIN = 1
+MQCHIDS_NOT_INDOUBT = 0
+MQCHIDS_INDOUBT = 1
+MQCHLD_ALL = (-1)
+MQCHLD_DEFAULT = 1
+MQCHLD_SHARED = 2
+MQCHLD_PRIVATE = 4
+MQCHLD_FIXSHARED = 5
+MQCHS_INACTIVE = 0
+MQCHS_BINDING = 1
+MQCHS_STARTING = 2
+MQCHS_RUNNING = 3
+MQCHS_STOPPING = 4
+MQCHS_RETRYING = 5
+MQCHS_STOPPED = 6
+MQCHS_REQUESTING = 7
+MQCHS_PAUSED = 8
+MQCHS_INITIALIZING = 13
+MQCHSSTATE_OTHER = 0
+MQCHSSTATE_END_OF_BATCH = 100
+MQCHSSTATE_SENDING = 200
+MQCHSSTATE_RECEIVING = 300
+MQCHSSTATE_SERIALIZING = 400
+MQCHSSTATE_RESYNCHING = 500
+MQCHSSTATE_HEARTBEATING = 600
+MQCHSSTATE_IN_SCYEXIT = 700
+MQCHSSTATE_IN_RCVEXIT = 800
+MQCHSSTATE_IN_SENDEXIT = 900
+MQCHSSTATE_IN_MSGEXIT = 1000
+MQCHSSTATE_IN_MREXIT = 1100
+MQCHSSTATE_IN_CHADEXIT = 1200
+MQCHSSTATE_NET_CONNECTING = 1250
+MQCHSSTATE_SSL_HANDSHAKING = 1300
+MQCHSSTATE_NAME_SERVER = 1400
+MQCHSSTATE_IN_MQPUT = 1500
+MQCHSSTATE_IN_MQGET = 1600
+MQCHSSTATE_IN_MQI_CALL = 1700
+MQCHSSTATE_COMPRESSING = 1800
+MQCHSH_RESTART_NO = 0
+MQCHSH_RESTART_YES = 1
+MQCHSR_STOP_NOT_REQUESTED = 0
+MQCHSR_STOP_REQUESTED = 1
+MQCHTAB_Q_MGR = 1
+MQCHTAB_CLNTCONN = 2
+MQCLRS_LOCAL = 1
+MQCLRS_GLOBAL = 2
+MQCLRT_RETAINED = 1
+MQCMDI_CMDSCOPE_ACCEPTED = 1
+MQCMDI_CMDSCOPE_GENERATED = 2
+MQCMDI_CMDSCOPE_COMPLETED = 3
+MQCMDI_QSG_DISP_COMPLETED = 4
+MQCMDI_COMMAND_ACCEPTED = 5
+MQCMDI_CLUSTER_REQUEST_QUEUED = 6
+MQCMDI_CHANNEL_INIT_STARTED = 7
+MQCMDI_RECOVER_STARTED = 11
+MQCMDI_BACKUP_STARTED = 12
+MQCMDI_RECOVER_COMPLETED = 13
+MQCMDI_SEC_TIMER_ZERO = 14
+MQCMDI_REFRESH_CONFIGURATION = 16
+MQCMDI_SEC_SIGNOFF_ERROR = 17
+MQCMDI_IMS_BRIDGE_SUSPENDED = 18
+MQCMDI_DB2_SUSPENDED = 19
+MQCMDI_DB2_OBSOLETE_MSGS = 20
+MQCMDI_SEC_UPPERCASE = 21
+MQCMDI_SEC_MIXEDCASE = 22
+MQDISCONNECT_NORMAL = 0
+MQDISCONNECT_IMPLICIT = 1
+MQDISCONNECT_Q_MGR = 2
+MQET_MQSC = 1
+MQEVO_OTHER = 0
+MQEVO_CONSOLE = 1
+MQEVO_INIT = 2
+MQEVO_MSG = 3
+MQEVO_MQSET = 4
+MQEVO_INTERNAL = 5
+MQEVR_DISABLED = 0
+MQEVR_ENABLED = 1
+MQEVR_EXCEPTION = 2
+MQEVR_NO_DISPLAY = 3
+MQFC_YES = 1
+MQFC_NO = 0
+MQHSTATE_INACTIVE = 0
+MQHSTATE_ACTIVE = 1
+MQINBD_Q_MGR = 0
+MQINBD_GROUP = 3
+MQIDO_COMMIT = 1
+MQIDO_BACKOUT = 2
+MQMCAS_STOPPED = 0
+MQMCAS_RUNNING = 3
+MQMODE_FORCE = 0
+MQMODE_QUIESCE = 1
+MQMODE_TERMINATE = 2
+MQPO_YES = 1
+MQPO_NO = 0
+MQPSST_ALL = 0
+MQPSST_LOCAL = 1
+MQPSST_PARENT = 2
+MQPSST_CHILD = 3
+MQPS_STATUS_INACTIVE = 0
+MQPS_STATUS_STARTING = 1
+MQPS_STATUS_STOPPING = 2
+MQPS_STATUS_ACTIVE = 3
+MQPS_STATUS_COMPAT = 4
+MQPS_STATUS_ERROR = 5
+MQPS_STATUS_REFUSED = 6
+MQQMDT_EXPLICIT_CLUSTER_SENDER = 1
+MQQMDT_AUTO_CLUSTER_SENDER = 2
+MQQMDT_AUTO_EXP_CLUSTER_SENDER = 4
+MQQMDT_CLUSTER_RECEIVER = 3
+MQQMFAC_IMS_BRIDGE = 1
+MQQMFAC_DB2 = 2
+MQQMSTA_STARTING = 1
+MQQMSTA_RUNNING = 2
+MQQMSTA_QUIESCING = 3
+MQQMT_NORMAL = 0
+MQQMT_REPOSITORY = 1
+MQQO_YES = 1
+MQQO_NO = 0
+MQQSIE_NONE = 0
+MQQSIE_HIGH = 1
+MQQSIE_OK = 2
+MQQSOT_ALL = 1
+MQQSOT_INPUT = 2
+MQQSOT_OUTPUT = 3
+MQQSGS_UNKNOWN = 0
+MQQSGS_CREATED = 1
+MQQSGS_ACTIVE = 2
+MQQSGS_INACTIVE = 3
+MQQSGS_FAILED = 4
+MQQSGS_PENDING = 5
+MQQSO_NO = 0
+MQQSO_YES = 1
+MQQSO_SHARED = 1
+MQQSO_EXCLUSIVE = 2
+MQQSUM_YES = 1
+MQQSUM_NO = 0
+MQRP_YES = 1
+MQRP_NO = 0
+MQRQ_CONN_NOT_AUTHORIZED = 1
+MQRQ_OPEN_NOT_AUTHORIZED = 2
+MQRQ_CLOSE_NOT_AUTHORIZED = 3
+MQRQ_CMD_NOT_AUTHORIZED = 4
+MQRQ_Q_MGR_STOPPING = 5
+MQRQ_Q_MGR_QUIESCING = 6
+MQRQ_CHANNEL_STOPPED_OK = 7
+MQRQ_CHANNEL_STOPPED_ERROR = 8
+MQRQ_CHANNEL_STOPPED_RETRY = 9
+MQRQ_CHANNEL_STOPPED_DISABLED = 10
+MQRQ_BRIDGE_STOPPED_OK = 11
+MQRQ_BRIDGE_STOPPED_ERROR = 12
+MQRQ_SSL_HANDSHAKE_ERROR = 13
+MQRQ_SSL_CIPHER_SPEC_ERROR = 14
+MQRQ_SSL_CLIENT_AUTH_ERROR = 15
+MQRQ_SSL_PEER_NAME_ERROR = 16
+MQRQ_SUB_NOT_AUTHORIZED = 17
+MQRQ_SUB_DEST_NOT_AUTHORIZED = 18
+MQRT_CONFIGURATION = 1
+MQRT_EXPIRY = 2
+MQRT_NSPROC = 3
+MQRT_PROXYSUB = 4
+MQSCO_Q_MGR = 1
+MQSCO_CELL = 2
+MQSECITEM_ALL = 0
+MQSECITEM_MQADMIN = 1
+MQSECITEM_MQNLIST = 2
+MQSECITEM_MQPROC = 3
+MQSECITEM_MQQUEUE = 4
+MQSECITEM_MQCONN = 5
+MQSECITEM_MQCMDS = 6
+MQSECITEM_MXADMIN = 7
+MQSECITEM_MXNLIST = 8
+MQSECITEM_MXPROC = 9
+MQSECITEM_MXQUEUE = 10
+MQSECITEM_MXTOPIC = 11
+MQSECSW_PROCESS = 1
+MQSECSW_NAMELIST = 2
+MQSECSW_Q = 3
+MQSECSW_TOPIC = 4
+MQSECSW_CONTEXT = 6
+MQSECSW_ALTERNATE_USER = 7
+MQSECSW_COMMAND = 8
+MQSECSW_CONNECTION = 9
+MQSECSW_SUBSYSTEM = 10
+MQSECSW_COMMAND_RESOURCES = 11
+MQSECSW_Q_MGR = 15
+MQSECSW_QSG = 16
+MQSECSW_OFF_FOUND = 21
+MQSECSW_ON_FOUND = 22
+MQSECSW_OFF_NOT_FOUND = 23
+MQSECSW_ON_NOT_FOUND = 24
+MQSECSW_OFF_ERROR = 25
+MQSECSW_ON_OVERRIDDEN = 26
+MQSECTYPE_AUTHSERV = 1
+MQSECTYPE_SSL = 2
+MQSECTYPE_CLASSES = 3
+MQSUS_YES = 1
+MQSUS_NO = 0
+MQSYNCPOINT_YES = 0
+MQSYNCPOINT_IFPER = 1
+MQSYSP_NO = 0
+MQSYSP_YES = 1
+MQSYSP_EXTENDED = 2
+MQSYSP_TYPE_INITIAL = 10
+MQSYSP_TYPE_SET = 11
+MQSYSP_TYPE_LOG_COPY = 12
+MQSYSP_TYPE_LOG_STATUS = 13
+MQSYSP_TYPE_ARCHIVE_TAPE = 14
+MQSYSP_ALLOC_BLK = 20
+MQSYSP_ALLOC_TRK = 21
+MQSYSP_ALLOC_CYL = 22
+MQSYSP_STATUS_BUSY = 30
+MQSYSP_STATUS_PREMOUNT = 31
+MQSYSP_STATUS_AVAILABLE = 32
+MQSYSP_STATUS_UNKNOWN = 33
+MQSYSP_STATUS_ALLOC_ARCHIVE = 34
+MQSYSP_STATUS_COPYING_BSDS = 35
+MQSYSP_STATUS_COPYING_LOG = 36
+MQSUBTYPE_API = 1
+MQSUBTYPE_ADMIN = 2
+MQSUBTYPE_PROXY = 3
+MQSUBTYPE_ALL = (-1)
+MQSUBTYPE_USER = (-2)
+MQTIME_UNIT_MINS = 0
+MQTIME_UNIT_SECS = 1
+MQUIDSUPP_NO = 0
+MQUIDSUPP_YES = 1
+MQUNDELIVERED_NORMAL = 0
+MQUNDELIVERED_SAFE = 1
+MQUNDELIVERED_DISCARD = 2
+MQUNDELIVERED_KEEP = 3
+MQUOWST_NONE = 0
+MQUOWST_ACTIVE = 1
+MQUOWST_PREPARED = 2
+MQUOWST_UNRESOLVED = 3
+MQUOWT_Q_MGR = 0
+MQUOWT_CICS = 1
+MQUOWT_RRS = 2
+MQUOWT_IMS = 3
+MQUOWT_XA = 4
+MQUSAGE_PS_AVAILABLE = 0
+MQUSAGE_PS_DEFINED = 1
+MQUSAGE_PS_OFFLINE = 2
+MQUSAGE_PS_NOT_DEFINED = 3
+MQUSAGE_EXPAND_USER = 1
+MQUSAGE_EXPAND_SYSTEM = 2
+MQUSAGE_EXPAND_NONE = 3
+MQUSAGE_DS_OLDEST_ACTIVE_UOW = 10
+MQUSAGE_DS_OLDEST_PS_RECOVERY = 11
+MQUSAGE_DS_OLDEST_CF_RECOVERY = 12
+MQOPER_SYSTEM_FIRST = 0
+MQOPER_UNKNOWN = 0
+MQOPER_BROWSE = 1
+MQOPER_DISCARD = 2
+MQOPER_GET = 3
+MQOPER_PUT = 4
+MQOPER_PUT_REPLY = 5
+MQOPER_PUT_REPORT = 6
+MQOPER_RECEIVE = 7
+MQOPER_SEND = 8
+MQOPER_TRANSFORM = 9
+MQOPER_PUBLISH = 10
+MQOPER_EXCLUDED_PUBLISH = 11
+MQOPER_DISCARDED_PUBLISH = 12
+MQOPER_SYSTEM_LAST = 65535
+MQOPER_APPL_FIRST = 65536
+MQOPER_APPL_LAST = 999999999
+MQROUTE_UNLIMITED_ACTIVITIES = 0
+MQROUTE_DETAIL_LOW = 0x00000002
+MQROUTE_DETAIL_MEDIUM = 0x00000008
+MQROUTE_DETAIL_HIGH = 0x00000020
+MQROUTE_FORWARD_ALL = 0x00000100
+MQROUTE_FORWARD_IF_SUPPORTED = 0x00000200
+MQROUTE_FORWARD_REJ_UNSUP_MASK = (-65536)
+MQROUTE_DELIVER_YES = 0x00001000
+MQROUTE_DELIVER_NO = 0x00002000
+MQROUTE_DELIVER_REJ_UNSUP_MASK = (-65536)
+MQROUTE_ACCUMULATE_NONE = 0x00010003
+MQROUTE_ACCUMULATE_IN_MSG = 0x00010004
+MQROUTE_ACCUMULATE_AND_REPLY = 0x00010005
+MQDELO_NONE = 0x00000000
+MQDELO_LOCAL = 0x00000004
+MQPUBO_NONE = 0x00000000
+MQPUBO_CORREL_ID_AS_IDENTITY = 0x00000001
+MQPUBO_RETAIN_PUBLICATION = 0x00000002
+MQPUBO_OTHER_SUBSCRIBERS_ONLY = 0x00000004
+MQPUBO_NO_REGISTRATION = 0x00000008
+MQPUBO_IS_RETAINED_PUBLICATION = 0x00000010
+MQREGO_NONE = 0x00000000
+MQREGO_CORREL_ID_AS_IDENTITY = 0x00000001
+MQREGO_ANONYMOUS = 0x00000002
+MQREGO_LOCAL = 0x00000004
+MQREGO_DIRECT_REQUESTS = 0x00000008
+MQREGO_NEW_PUBLICATIONS_ONLY = 0x00000010
+MQREGO_PUBLISH_ON_REQUEST_ONLY = 0x00000020
+MQREGO_DEREGISTER_ALL = 0x00000040
+MQREGO_INCLUDE_STREAM_NAME = 0x00000080
+MQREGO_INFORM_IF_RETAINED = 0x00000100
+MQREGO_DUPLICATES_OK = 0x00000200
+MQREGO_NON_PERSISTENT = 0x00000400
+MQREGO_PERSISTENT = 0x00000800
+MQREGO_PERSISTENT_AS_PUBLISH = 0x00001000
+MQREGO_PERSISTENT_AS_Q = 0x00002000
+MQREGO_ADD_NAME = 0x00004000
+MQREGO_NO_ALTERATION = 0x00008000
+MQREGO_FULL_RESPONSE = 0x00010000
+MQREGO_JOIN_SHARED = 0x00020000
+MQREGO_JOIN_EXCLUSIVE = 0x00040000
+MQREGO_LEAVE_ONLY = 0x00080000
+MQREGO_VARIABLE_USER_ID = 0x00100000
+MQREGO_LOCKED = 0x00200000
+MQUA_FIRST = 65536
+MQUA_LAST = 999999999
+MQCFGR_DEFAULT = MQCFT_GROUP,\
+                        MQCFGR_STRUC_LENGTH,\
+                        0,\
+                        0
+MQCFIF_DEFAULT = MQCFT_INTEGER_FILTER,\
+                        MQCFIF_STRUC_LENGTH,\
+                        0,\
+                        0,\
+                        0
+MQCFIN_DEFAULT = MQCFT_INTEGER,\
+                        MQCFIN_STRUC_LENGTH,\
+                        0,\
+                        0
+MQCFIN64_DEFAULT = MQCFT_INTEGER64,\
+                        MQCFIN64_STRUC_LENGTH,\
+                        0,\
+                        0,\
+                        0
diff --git a/code/CMQXC.py b/code/CMQXC.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9DTVFYQy5weQ==
--- /dev/null
+++ b/code/CMQXC.py
@@ -0,0 +1,256 @@
+# Generated by h2py from /opt/mqm/inc/cmqxc.h
+
+from struct import calcsize
+
+# 64bit
+if calcsize("P") == 8:
+    MQACH_LENGTH_1 = 72
+    MQACH_CURRENT_LENGTH = 72
+    MQCD_LENGTH_4 = 1568
+    MQCD_LENGTH_5 = 1584
+    MQCD_LENGTH_6 = 1688
+    MQCD_LENGTH_7 = 1792
+    MQCD_LENGTH_8 = 1888
+    MQCD_LENGTH_9 = 1912
+    MQCD_LENGTH_10 = 1920
+    MQCD_CURRENT_LENGTH = 1920
+else:
+    MQACH_LENGTH_1 = 68
+    MQACH_CURRENT_LENGTH = 68
+    MQCD_LENGTH_4 = 1540
+    MQCD_LENGTH_5 = 1552
+    MQCD_LENGTH_6 = 1648
+    MQCD_LENGTH_7 = 1748
+    MQCD_LENGTH_8 = 1840
+    MQCD_LENGTH_9 = 1864
+    MQCD_LENGTH_10 = 1876
+    MQCD_CURRENT_LENGTH = 1876
+
+MQACH_STRUC_ID = "ACH "
+MQACH_VERSION_1 = 1
+MQACH_CURRENT_VERSION = 1
+MQAXC_STRUC_ID = "AXC "
+MQAXC_VERSION_1 = 1
+MQAXC_CURRENT_VERSION = 1
+MQXE_OTHER = 0
+MQXE_MCA = 1
+MQXE_MCA_SVRCONN = 2
+MQXE_COMMAND_SERVER = 3
+MQXE_MQSC = 4
+MQAXP_STRUC_ID = "AXP "
+MQAXP_VERSION_1 = 1
+MQAXP_VERSION_2 = 2
+MQAXP_CURRENT_VERSION = 2
+MQXACT_EXTERNAL = 1
+MQXACT_INTERNAL = 2
+MQXPDA_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"\
+                     "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQXF_INIT = 1
+MQXF_TERM = 2
+MQXF_CONN = 3
+MQXF_CONNX = 4
+MQXF_DISC = 5
+MQXF_OPEN = 6
+MQXF_CLOSE = 7
+MQXF_PUT1 = 8
+MQXF_PUT = 9
+MQXF_GET = 10
+MQXF_DATA_CONV_ON_GET = 11
+MQXF_INQ = 12
+MQXF_SET = 13
+MQXF_BEGIN = 14
+MQXF_CMIT = 15
+MQXF_BACK = 16
+MQXF_STAT = 18
+MQXF_CB = 19
+MQXF_CTL = 20
+MQXF_CALLBACK = 21
+MQXF_SUB = 22
+MQXF_SUBRQ = 23
+MQCD_VERSION_1 = 1
+MQCD_VERSION_2 = 2
+MQCD_VERSION_3 = 3
+MQCD_VERSION_4 = 4
+MQCD_VERSION_5 = 5
+MQCD_VERSION_6 = 6
+MQCD_VERSION_7 = 7
+MQCD_VERSION_8 = 8
+MQCD_VERSION_9 = 9
+MQCD_VERSION_10 = 10
+MQCD_CURRENT_VERSION = 10
+MQCHT_SENDER = 1
+MQCHT_SERVER = 2
+MQCHT_RECEIVER = 3
+MQCHT_REQUESTER = 4
+MQCHT_ALL = 5
+MQCHT_CLNTCONN = 6
+MQCHT_SVRCONN = 7
+MQCHT_CLUSRCVR = 8
+MQCHT_CLUSSDR = 9
+MQCOMPRESS_NOT_AVAILABLE = (-1)
+MQCOMPRESS_NONE = 0
+MQCOMPRESS_RLE = 1
+MQCOMPRESS_ZLIBFAST = 2
+MQCOMPRESS_ZLIBHIGH = 4
+MQCOMPRESS_SYSTEM = 8
+MQCOMPRESS_ANY = 0x0FFFFFFF
+MQXPT_ALL = (-1)
+MQXPT_LOCAL = 0
+MQXPT_LU62 = 1
+MQXPT_TCP = 2
+MQXPT_NETBIOS = 3
+MQXPT_SPX = 4
+MQXPT_DECNET = 5
+MQXPT_UDP = 6
+MQPA_DEFAULT = 1
+MQPA_CONTEXT = 2
+MQPA_ONLY_MCA = 3
+MQPA_ALTERNATE_OR_MCA = 4
+MQCDC_SENDER_CONVERSION = 1
+MQCDC_NO_SENDER_CONVERSION = 0
+MQMCAT_PROCESS = 1
+MQMCAT_THREAD = 2
+MQNPMS_NORMAL = 1
+MQNPMS_FAST = 2
+MQSCA_REQUIRED = 0
+MQSCA_OPTIONAL = 1
+MQKAI_AUTO = (-1)
+MQCAFTY_NONE = 0
+MQCAFTY_PREFERRED = 1
+MQCXP_STRUC_ID = "CXP "
+MQCXP_VERSION_1 = 1
+MQCXP_VERSION_2 = 2
+MQCXP_VERSION_3 = 3
+MQCXP_VERSION_4 = 4
+MQCXP_VERSION_5 = 5
+MQCXP_VERSION_6 = 6
+MQCXP_VERSION_7 = 7
+MQCXP_CURRENT_VERSION = 7
+MQXR2_PUT_WITH_DEF_ACTION = 0
+MQXR2_PUT_WITH_DEF_USERID = 1
+MQXR2_PUT_WITH_MSG_USERID = 2
+MQXR2_USE_AGENT_BUFFER = 0
+MQXR2_USE_EXIT_BUFFER = 4
+MQXR2_DEFAULT_CONTINUATION = 0
+MQXR2_CONTINUE_CHAIN = 8
+MQXR2_SUPPRESS_CHAIN = 16
+MQXR2_STATIC_CACHE = 0
+MQXR2_DYNAMIC_CACHE = 32
+MQCF_NONE = 0x00000000
+MQCF_DIST_LISTS = 0x00000001
+MQDXP_STRUC_ID = "DXP "
+MQDXP_VERSION_1 = 1
+MQDXP_CURRENT_VERSION = 1
+MQXDR_OK = 0
+MQXDR_CONVERSION_FAILED = 1
+MQPXP_STRUC_ID = "PXP "
+MQPXP_VERSION_1 = 1
+MQPXP_CURRENT_VERSION = 1
+MQDT_APPL = 1
+MQDT_BROKER = 2
+MQTXP_STRUC_ID = "TXP "
+MQTXP_VERSION_1 = 1
+MQTXP_CURRENT_VERSION = 1
+MQWDR_STRUC_ID = "WDR "
+MQWDR_VERSION_1 = 1
+MQWDR_VERSION_2 = 2
+MQWDR_CURRENT_VERSION = 2
+MQWDR_LENGTH_1 = 124
+MQWDR_LENGTH_2 = 136
+MQWDR_CURRENT_LENGTH = 136
+MQQMF_REPOSITORY_Q_MGR = 0x00000002
+MQQMF_CLUSSDR_USER_DEFINED = 0x00000008
+MQQMF_CLUSSDR_AUTO_DEFINED = 0x00000010
+MQQMF_AVAILABLE = 0x00000020
+MQWQR_STRUC_ID = "WQR "
+MQWQR_VERSION_1 = 1
+MQWQR_VERSION_2 = 2
+MQWQR_VERSION_3 = 3
+MQWQR_CURRENT_VERSION = 3
+MQWQR_LENGTH_1 = 200
+MQWQR_LENGTH_2 = 208
+MQWQR_LENGTH_3 = 212
+MQWQR_CURRENT_LENGTH = 212
+MQQF_LOCAL_Q = 0x00000001
+MQQF_CLWL_USEQ_ANY = 0x00000040
+MQQF_CLWL_USEQ_LOCAL = 0x00000080
+MQWXP_STRUC_ID = "WXP "
+MQWXP_VERSION_1 = 1
+MQWXP_VERSION_2 = 2
+MQWXP_VERSION_3 = 3
+MQWXP_CURRENT_VERSION = 3
+MQWXP_PUT_BY_CLUSTER_CHL = 0x00000002
+MQCLCT_STATIC = 0
+MQCLCT_DYNAMIC = 1
+MQXEPO_STRUC_ID = "XEPO"
+MQXEPO_VERSION_1 = 1
+MQXEPO_CURRENT_VERSION = 1
+MQXEPO_NONE = 0x00000000
+MQXT_API_CROSSING_EXIT = 1
+MQXT_API_EXIT = 2
+MQXT_CHANNEL_SEC_EXIT = 11
+MQXT_CHANNEL_MSG_EXIT = 12
+MQXT_CHANNEL_SEND_EXIT = 13
+MQXT_CHANNEL_RCV_EXIT = 14
+MQXT_CHANNEL_MSG_RETRY_EXIT = 15
+MQXT_CHANNEL_AUTO_DEF_EXIT = 16
+MQXT_CLUSTER_WORKLOAD_EXIT = 20
+MQXT_PUBSUB_ROUTING_EXIT = 21
+MQXR_BEFORE = 1
+MQXR_AFTER = 2
+MQXR_CONNECTION = 3
+MQXR_INIT = 11
+MQXR_TERM = 12
+MQXR_MSG = 13
+MQXR_XMIT = 14
+MQXR_SEC_MSG = 15
+MQXR_INIT_SEC = 16
+MQXR_RETRY = 17
+MQXR_AUTO_CLUSSDR = 18
+MQXR_AUTO_RECEIVER = 19
+MQXR_CLWL_OPEN = 20
+MQXR_CLWL_PUT = 21
+MQXR_CLWL_MOVE = 22
+MQXR_CLWL_REPOS = 23
+MQXR_CLWL_REPOS_MOVE = 24
+MQXR_END_BATCH = 25
+MQXR_ACK_RECEIVED = 26
+MQXR_AUTO_SVRCONN = 27
+MQXR_AUTO_CLUSRCVR = 28
+MQXR_SEC_PARMS = 29
+MQXCC_OK = 0
+MQXCC_SUPPRESS_FUNCTION = (-1)
+MQXCC_SKIP_FUNCTION = (-2)
+MQXCC_SEND_AND_REQUEST_SEC_MSG = (-3)
+MQXCC_SEND_SEC_MSG = (-4)
+MQXCC_SUPPRESS_EXIT = (-5)
+MQXCC_CLOSE_CHANNEL = (-6)
+MQXCC_REQUEST_ACK = (-7)
+MQXCC_FAILED = (-8)
+MQXUA_NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+MQDCC_DEFAULT_CONVERSION = 0x00000001
+MQDCC_FILL_TARGET_BUFFER = 0x00000002
+MQDCC_INT_DEFAULT_CONVERSION = 0x00000004
+MQDCC_SOURCE_ENC_NATIVE = 0x00000020
+MQDCC_SOURCE_ENC_NORMAL = 0x00000010
+MQDCC_SOURCE_ENC_REVERSED = 0x00000020
+MQDCC_SOURCE_ENC_UNDEFINED = 0x00000000
+MQDCC_TARGET_ENC_NATIVE = 0x00000200
+MQDCC_TARGET_ENC_NORMAL = 0x00000100
+MQDCC_TARGET_ENC_REVERSED = 0x00000200
+MQDCC_TARGET_ENC_UNDEFINED = 0x00000000
+MQDCC_NONE = 0x00000000
+MQDCC_SOURCE_ENC_MASK = 0x000000F0
+MQDCC_TARGET_ENC_MASK = 0x00000F00
+MQDCC_SOURCE_ENC_FACTOR = 16
+MQDCC_TARGET_ENC_FACTOR = 256
+
+# Manually added
+MQCXP_STRUC_ID_ARRAY = ['C','X','P',' ']
+MQDXP_STRUC_ID_ARRAY = ['D','X','P',' ']
+MQPXP_STRUC_ID_ARRAY = ['P','X','P',' ']
+MQWDR_STRUC_ID_ARRAY = ['W','D','R',' ']
+MQWQR_STRUC_ID_ARRAY = ['W','Q','R',' ']
+MQWXP_STRUC_ID_ARRAY = ['W','X','P',' ']
+MQXUA_NONE_ARRAY = ['\0','\0','\0','\0','\0','\0','\0','\0', '\0','\0','\0','\0','\0','\0','\0','\0']
diff --git a/code/CMQZC.py b/code/CMQZC.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9DTVFaQy5weQ==
--- /dev/null
+++ b/code/CMQZC.py
@@ -0,0 +1,93 @@
+# Generated by h2py from /opt/mqm/inc/cmqzc.h
+MQZAC_STRUC_ID = "ZAC "
+MQZAC_VERSION_1 = 1
+MQZAC_CURRENT_VERSION = 1
+MQZAT_INITIAL_CONTEXT = 0
+MQZAT_CHANGE_CONTEXT = 1
+MQZAD_STRUC_ID = "ZAD "
+MQZAD_VERSION_1 = 1
+MQZAD_VERSION_2 = 2
+MQZAD_CURRENT_VERSION = 2
+MQZED_STRUC_ID = "ZED "
+MQZED_VERSION_1 = 1
+MQZED_VERSION_2 = 2
+MQZED_CURRENT_VERSION = 2
+MQZFP_STRUC_ID = "ZFP "
+MQZFP_VERSION_1 = 1
+MQZFP_CURRENT_VERSION = 1
+MQZIC_STRUC_ID = "ZIC "
+MQZIC_VERSION_1 = 1
+MQZIC_CURRENT_VERSION = 1
+MQZID_INIT = 0
+MQZID_TERM = 1
+MQZID_INIT_AUTHORITY = 0
+MQZID_TERM_AUTHORITY = 1
+MQZID_CHECK_AUTHORITY = 2
+MQZID_COPY_ALL_AUTHORITY = 3
+MQZID_DELETE_AUTHORITY = 4
+MQZID_SET_AUTHORITY = 5
+MQZID_GET_AUTHORITY = 6
+MQZID_GET_EXPLICIT_AUTHORITY = 7
+MQZID_REFRESH_CACHE = 8
+MQZID_ENUMERATE_AUTHORITY_DATA = 9
+MQZID_AUTHENTICATE_USER = 10
+MQZID_FREE_USER = 11
+MQZID_INQUIRE = 12
+MQZID_INIT_NAME = 0
+MQZID_TERM_NAME = 1
+MQZID_LOOKUP_NAME = 2
+MQZID_INSERT_NAME = 3
+MQZID_DELETE_NAME = 4
+MQZID_INIT_USERID = 0
+MQZID_TERM_USERID = 1
+MQZID_FIND_USERID = 2
+MQZIO_PRIMARY = 0
+MQZIO_SECONDARY = 1
+MQZTO_PRIMARY = 0
+MQZTO_SECONDARY = 1
+MQZCI_DEFAULT = 0
+MQZCI_CONTINUE = 0
+MQZCI_STOP = 1
+MQZAS_VERSION_1 = 1
+MQZAS_VERSION_2 = 2
+MQZAS_VERSION_3 = 3
+MQZAS_VERSION_4 = 4
+MQZAS_VERSION_5 = 5
+MQZAO_CONNECT = 0x00000001
+MQZAO_BROWSE = 0x00000002
+MQZAO_INPUT = 0x00000004
+MQZAO_OUTPUT = 0x00000008
+MQZAO_INQUIRE = 0x00000010
+MQZAO_SET = 0x00000020
+MQZAO_PASS_IDENTITY_CONTEXT = 0x00000040
+MQZAO_PASS_ALL_CONTEXT = 0x00000080
+MQZAO_SET_IDENTITY_CONTEXT = 0x00000100
+MQZAO_SET_ALL_CONTEXT = 0x00000200
+MQZAO_ALTERNATE_USER_AUTHORITY = 0x00000400
+MQZAO_PUBLISH = 0x00000800
+MQZAO_SUBSCRIBE = 0x00001000
+MQZAO_RESUME = 0x00002000
+MQZAO_ALL_MQI = 0x00003FFF
+MQZAO_CREATE = 0x00010000
+MQZAO_DELETE = 0x00020000
+MQZAO_DISPLAY = 0x00040000
+MQZAO_CHANGE = 0x00080000
+MQZAO_CLEAR = 0x00100000
+MQZAO_CONTROL = 0x00200000
+MQZAO_CONTROL_EXTENDED = 0x00400000
+MQZAO_AUTHORIZE = 0x00800000
+MQZAO_ALL_ADMIN = 0x00FE0000
+MQZAO_SYSTEM = 0x02000000
+MQZAO_ALL = 0x02FE3FFF
+MQZAO_REMOVE = 0x01000000
+MQZAO_NONE = 0x00000000
+MQZAET_NONE = 0x00000000
+MQZAET_PRINCIPAL = 0x00000001
+MQZAET_GROUP = 0x00000002
+MQZAET_UNKNOWN = 0x00000003
+MQZSE_START = 1
+MQZSE_CONTINUE = 0
+MQZSL_NOT_RETURNED = 0
+MQZSL_RETURNED = 1
+MQZNS_VERSION_1 = 1
+MQZUS_VERSION_1 = 1
diff --git a/code/MANIFEST.in b/code/MANIFEST.in
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9NQU5JRkVTVC5pbg==
--- /dev/null
+++ b/code/MANIFEST.in
@@ -0,0 +1,3 @@
+include *.py
+include *.c
+include scripts/*.py
diff --git a/code/examples/alternate_user_id.py b/code/examples/alternate_user_id.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9hbHRlcm5hdGVfdXNlcl9pZC5weQ==
--- /dev/null
+++ b/code/examples/alternate_user_id.py
@@ -0,0 +1,27 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+import CMQC
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!"
+alternate_user_id = "myuser"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+od = pymqi.OD()
+od.ObjectName = queue_name
+od.AlternateUserId = alternate_user_id
+
+queue = pymqi.Queue(qmgr)
+queue.open(od, CMQC.MQOO_OUTPUT | CMQC.MQOO_ALTERNATE_USER_AUTHORITY)
+queue.put(message)
+
+queue.close()
+qmgr.disconnect()
diff --git a/code/examples/avoid_mqrc_already_connected1.py b/code/examples/avoid_mqrc_already_connected1.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9hdm9pZF9tcXJjX2FscmVhZHlfY29ubmVjdGVkMS5weQ==
--- /dev/null
+++ b/code/examples/avoid_mqrc_already_connected1.py
@@ -0,0 +1,28 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import CMQC, pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.QueueManager(None)
+qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+
+try:
+    qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+except pymqi.MQMIError, e:
+    if e.comp == CMQC.MQCC_WARNING and e.reason == CMQC.MQRC_ALREADY_CONNECTED:
+        # Move along, nothing to see here..
+        pass
+
+queue = pymqi.Queue(qmgr, queue_name)
+queue.put(message)
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/avoid_mqrc_already_connected2.py b/code/examples/avoid_mqrc_already_connected2.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9hdm9pZF9tcXJjX2FscmVhZHlfY29ubmVjdGVkMi5weQ==
--- /dev/null
+++ b/code/examples/avoid_mqrc_already_connected2.py
@@ -0,0 +1,33 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import CMQC, pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!"
+conn_info = "%s(%s)" % (host, port)
+
+cd = pymqi.CD()
+
+cd.ChannelName = channel
+cd.ConnectionName = conn_info
+cd.ChannelType = CMQC.MQCHT_CLNTCONN
+cd.TransportType = CMQC.MQXPT_TCP
+
+connect_options = CMQC.MQCNO_HANDLE_SHARE_BLOCK
+
+qmgr = pymqi.QueueManager(None)
+
+for x in range(10):
+    qmgr.connect_with_options(queue_manager, cd=cd, opts=connect_options)
+    qmgr.connect_with_options(queue_manager, cd=cd, opts=connect_options)
+
+queue = pymqi.Queue(qmgr, queue_name)
+queue.put(message)
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/channel_compression.py b/code/examples/channel_compression.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jaGFubmVsX2NvbXByZXNzaW9uLnB5
--- /dev/null
+++ b/code/examples/channel_compression.py
@@ -0,0 +1,24 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+import CMQXC
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!" * 10000
+conn_info = "%s(%s)" % (host, port)
+
+cd = pymqi.CD()
+cd.MsgCompList[1] = CMQXC.MQCOMPRESS_ZLIBHIGH
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+queue = pymqi.Queue(qmgr, queue_name)
+queue.put(message)
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/check_mq_version_rpm.py b/code/examples/check_mq_version_rpm.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jaGVja19tcV92ZXJzaW9uX3JwbS5weQ==
--- /dev/null
+++ b/code/examples/check_mq_version_rpm.py
@@ -0,0 +1,21 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import rpm
+
+logging.basicConfig(level=logging.INFO)
+
+package_name = "MQSeriesClient"
+
+ts = rpm.TransactionSet()
+mi = ts.dbMatch("name", package_name)
+
+if not mi.count():
+    logging.info("Did not find package [%s] in RPM database." % package_name)
+else:
+    for header in mi:
+        version = header["version"]
+        msg = "Found package [%s], version [%s]." % (package_name, version)
+        logging.info(msg)
diff --git a/code/examples/check_mq_version_windows.py b/code/examples/check_mq_version_windows.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jaGVja19tcV92ZXJzaW9uX3dpbmRvd3MucHk=
--- /dev/null
+++ b/code/examples/check_mq_version_windows.py
@@ -0,0 +1,17 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+import _winreg
+
+logging.basicConfig(level=logging.INFO)
+
+key_name = "Software\\IBM\\MQSeries\\CurrentVersion"
+
+try:
+    key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name)
+except WindowsError:
+    logging.info("Could not find WebSphere MQ-related information in Windows registry.")
+else:
+    version = _winreg.QueryValueEx(key, "VRMF")[0]
+    logging.info("WebSphere MQ version is [%s]." % version)
diff --git a/code/examples/checking_cc_and_rc.py b/code/examples/checking_cc_and_rc.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jaGVja2luZ19jY19hbmRfcmMucHk=
--- /dev/null
+++ b/code/examples/checking_cc_and_rc.py
@@ -0,0 +1,19 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import CMQC
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "foo.bar" # Note the made up host name
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+try:
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+except pymqi.MQMIError, e:
+    if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_HOST_NOT_AVAILABLE:
+        logging.error("Such a host [%s] does not exist." % host)
diff --git a/code/examples/connect_bindings.py b/code/examples/connect_bindings.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jb25uZWN0X2JpbmRpbmdzLnB5
--- /dev/null
+++ b/code/examples/connect_bindings.py
@@ -0,0 +1,9 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+
+queue_manager = "QM01"
+qmgr = pymqi.connect(queue_manager)
+
+qmgr.disconnect()
\ No newline at end of file
diff --git a/code/examples/connect_client.py b/code/examples/connect_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9jb25uZWN0X2NsaWVudC5weQ==
--- /dev/null
+++ b/code/examples/connect_client.py
@@ -0,0 +1,13 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+qmgr.disconnect()
diff --git a/code/examples/define_channel.py b/code/examples/define_channel.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9kZWZpbmVfY2hhbm5lbC5weQ==
--- /dev/null
+++ b/code/examples/define_channel.py
@@ -0,0 +1,24 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+import CMQC, CMQXC, CMQCFC
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+channel_name = "MYCHANNEL.1"
+channel_type = CMQXC.MQCHT_SVRCONN
+
+args = {CMQCFC.MQCACH_CHANNEL_NAME: channel_name,
+        CMQCFC.MQIACH_CHANNEL_TYPE: channel_type}
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+pcf = pymqi.PCFExecute(qmgr)
+pcf.MQCMD_CREATE_CHANNEL(args)
+
+qmgr.disconnect()
diff --git a/code/examples/define_queue.py b/code/examples/define_queue.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9kZWZpbmVfcXVldWUucHk=
--- /dev/null
+++ b/code/examples/define_queue.py
@@ -0,0 +1,26 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+import CMQC
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+queue_name = "MYQUEUE.1"
+queue_type = CMQC.MQQT_LOCAL
+max_depth = 123456
+
+args = {CMQC.MQCA_Q_NAME: queue_name,
+        CMQC.MQIA_Q_TYPE: queue_type,
+        CMQC.MQIA_MAX_Q_DEPTH: max_depth}
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+pcf = pymqi.PCFExecute(qmgr)
+pcf.MQCMD_CREATE_Q(args)
+
+qmgr.disconnect()
diff --git a/code/examples/dis_channels.py b/code/examples/dis_channels.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9kaXNfY2hhbm5lbHMucHk=
--- /dev/null
+++ b/code/examples/dis_channels.py
@@ -0,0 +1,36 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+import CMQC, CMQCFC
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+prefix = "SYSTEM.*"
+
+args = {CMQCFC.MQCACH_CHANNEL_NAME: prefix}
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+pcf = pymqi.PCFExecute(qmgr)
+
+try:
+    response = pcf.MQCMD_INQUIRE_CHANNEL(args)
+except pymqi.MQMIError, e:
+    if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_UNKNOWN_OBJECT_NAME:
+        logging.info("No channels matched prefix [%s]" % prefix)
+    else:
+        raise
+else:
+    for channel_info in response:
+        channel_name = channel_info[CMQCFC.MQCACH_CHANNEL_NAME]
+        logging.info("Found channel [%s]" % channel_name)
+
+qmgr.disconnect()
diff --git a/code/examples/dis_queues.py b/code/examples/dis_queues.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9kaXNfcXVldWVzLnB5
--- /dev/null
+++ b/code/examples/dis_queues.py
@@ -0,0 +1,38 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+import CMQC, CMQCFC, CMQXC
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = "QM01"
+channel = "CHANNEL.1"
+host = "127.0.0.1"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+prefix = "SYSTEM.*"
+queue_type = CMQC.MQQT_MODEL
+
+args = {CMQC.MQCA_Q_NAME: prefix,
+        CMQC.MQIA_Q_TYPE: queue_type}
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+pcf = pymqi.PCFExecute(qmgr)
+
+try:
+    response = pcf.MQCMD_INQUIRE_Q(args)
+except pymqi.MQMIError, e:
+    if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_UNKNOWN_OBJECT_NAME:
+        logging.info("No queues matched given arguments.")
+    else:
+        raise
+else:
+    for queue_info in response:
+        queue_name = queue_info[CMQC.MQCA_Q_NAME]
+        logging.info("Found queue [%s]" % queue_name)
+
+qmgr.disconnect()
diff --git a/code/examples/dynamic_queues.py b/code/examples/dynamic_queues.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9keW5hbWljX3F1ZXVlcy5weQ==
--- /dev/null
+++ b/code/examples/dynamic_queues.py
@@ -0,0 +1,40 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import CMQC
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+message = "Please reply to a dynamic queue, thanks."
+dynamic_queue_prefix = "MY.REPLIES.*"
+request_queue = "TEST.1"
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+# Dynamic queue's object descriptor.
+dyn_od = pymqi.OD()
+dyn_od.ObjectName = "SYSTEM.DEFAULT.MODEL.QUEUE"
+dyn_od.DynamicQName = dynamic_queue_prefix
+
+# Open the dynamic queue.
+dyn_input_open_options = CMQC.MQOO_INPUT_EXCLUSIVE
+dyn_queue = pymqi.Queue(qmgr, dyn_od, dyn_input_open_options)
+dyn_queue_name = dyn_od.ObjectName.strip()
+
+# Prepare a Message Descriptor for the request message.
+md = pymqi.MD()
+md.ReplyToQ = dyn_queue_name
+
+# Send the message.
+queue = pymqi.Queue(qmgr, request_queue)
+queue.put(message, md)
+
+# Get and process the response here..
+
+dyn_queue.close()
+queue.close()
+qmgr.disconnect()
diff --git a/code/examples/get_message.py b/code/examples/get_message.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9nZXRfbWVzc2FnZS5weQ==
--- /dev/null
+++ b/code/examples/get_message.py
@@ -0,0 +1,19 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+queue = pymqi.Queue(qmgr, queue_name)
+message = queue.get()
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/get_wait_multiple_messages.py b/code/examples/get_wait_multiple_messages.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9nZXRfd2FpdF9tdWx0aXBsZV9tZXNzYWdlcy5weQ==
--- /dev/null
+++ b/code/examples/get_wait_multiple_messages.py
@@ -0,0 +1,49 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import CMQC
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+conn_info = "%s(%s)" % (host, port)
+
+# Message Descriptor
+md = pymqi.MD()
+
+# Get Message Options
+gmo = pymqi.GMO()
+gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+gmo.WaitInterval = 5000 # 5 seconds
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+queue = pymqi.Queue(qmgr, queue_name)
+
+keep_running = True
+
+while keep_running:
+    try:
+        # Wait up to to gmo.WaitInterval for a new message.
+        message = queue.get(None, md, gmo)
+
+        # Process the message here..
+
+        # Reset the MsgId, CorrelId & GroupId so that we can reuse
+        # the same 'md' object again.
+        md.MsgId = CMQC.MQMI_NONE
+        md.CorrelId = CMQC.MQCI_NONE
+        md.GroupId = CMQC.MQGI_NONE
+
+    except pymqi.MQMIError, e:
+        if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_NO_MSG_AVAILABLE:
+            # No messages, that's OK, we can ignore it.
+            pass
+        else:
+            # Some other error condition.
+            raise
+
+queue.close()
+qmgr.disconnect()
diff --git a/code/examples/get_wait_single_message.py b/code/examples/get_wait_single_message.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9nZXRfd2FpdF9zaW5nbGVfbWVzc2FnZS5weQ==
--- /dev/null
+++ b/code/examples/get_wait_single_message.py
@@ -0,0 +1,28 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import CMQC
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+conn_info = "%s(%s)" % (host, port)
+
+# Message Descriptor
+md = pymqi.MD()
+
+# Get Message Options
+gmo = pymqi.GMO()
+gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+gmo.WaitInterval = 5000 # 5 seconds
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+queue = pymqi.Queue(qmgr, queue_name)
+message = queue.get(None, md, gmo)
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/is_connected.py b/code/examples/is_connected.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9pc19jb25uZWN0ZWQucHk=
--- /dev/null
+++ b/code/examples/is_connected.py
@@ -0,0 +1,21 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+import CMQC
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+logging.info("qmgr.is_connected=[%s]" % qmgr.is_connected)
+
+qmgr.disconnect()
diff --git a/code/examples/message_priority.py b/code/examples/message_priority.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9tZXNzYWdlX3ByaW9yaXR5LnB5
--- /dev/null
+++ b/code/examples/message_priority.py
@@ -0,0 +1,35 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!"
+conn_info = "%s(%s)" % (host, port)
+priority = 2
+
+put_md = pymqi.MD()
+put_md.Priority = priority
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+put_queue = pymqi.Queue(qmgr, queue_name)
+put_queue.put(message, put_md)
+
+get_md = pymqi.MD()
+get_queue = pymqi.Queue(qmgr, queue_name)
+message_body = get_queue.get(None, get_md)
+
+logging.info("Received a message, priority [%s]." % get_md.Priority)
+
+put_queue.close()
+get_queue.close()
+qmgr.disconnect()
diff --git a/code/examples/ping_queue_manager.py b/code/examples/ping_queue_manager.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9waW5nX3F1ZXVlX21hbmFnZXIucHk=
--- /dev/null
+++ b/code/examples/ping_queue_manager.py
@@ -0,0 +1,18 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+import CMQC, CMQCFC, CMQXC
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+pcf = pymqi.PCFExecute(qmgr)
+pcf.MQCMD_PING_Q_MGR()
+
+qmgr.disconnect()
diff --git a/code/examples/put_get_correl_id.py b/code/examples/put_get_correl_id.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9wdXRfZ2V0X2NvcnJlbF9pZC5weQ==
--- /dev/null
+++ b/code/examples/put_get_correl_id.py
@@ -0,0 +1,164 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+# stdlib
+import logging, threading, time, traceback, uuid
+
+# PyMQI
+import pymqi
+import CMQC
+
+logging.basicConfig(level=logging.INFO)
+
+# Queue manager name
+qm_name = "QM01"
+
+# Listener host and port
+listener = "192.168.1.135(1434)"
+
+# Channel to transfer data through
+channel = "SVRCONN.1"
+
+# Request Queue
+request_queue_name = "REQUEST.QUEUE.1"
+
+# ReplyTo Queue
+replyto_queue_name = "REPLYTO.QUEUE.1"
+
+message_prefix = "Test Data. "
+
+class Producer(threading.Thread):
+    """ A base class for any producer used in this example.
+    """
+    def __init__(self):
+        threading.Thread.__init__(self)
+        self.daemon = True
+
+        cd = pymqi.CD()
+        cd.ChannelName = channel
+        cd.ConnectionName = listener
+        cd.ChannelType = CMQC.MQCHT_CLNTCONN
+        cd.TransportType = CMQC.MQXPT_TCP
+        self.qm = pymqi.QueueManager(None)
+        self.qm.connect_with_options(qm_name, opts=CMQC.MQCNO_HANDLE_SHARE_NO_BLOCK,
+                                   cd=cd)
+
+        self.req_queue = pymqi.Queue(self.qm, request_queue_name)
+        self.replyto_queue = pymqi.Queue(self.qm, replyto_queue_name)
+
+
+class RequestProducer(Producer):
+    """ Instances of this class produce an infinite stream of request messages
+    and wait for appropriate responses on reply-to queues.
+    """
+
+    def run(self):
+
+        while True:
+            # Put the request message.
+            put_mqmd = pymqi.MD()
+
+            # Set the MsgType to request.
+            put_mqmd["MsgType"] = CMQC.MQMT_REQUEST
+
+            # Set up the ReplyTo QUeue/Queue Manager (Queue Manager is automatically
+            # set by MQ).
+
+            put_mqmd["ReplyToQ"] = replyto_queue_name
+            put_mqmd["ReplyToQMgr"] = qm_name
+
+            # Set up the put options - must do with NO_SYNCPOINT so that the request
+            # message is committed immediately.
+            put_opts = pymqi.PMO(Options=CMQC.MQPMO_NO_SYNCPOINT + CMQC.MQPMO_FAIL_IF_QUIESCING)
+
+            # Create a random message.
+            message = message_prefix + uuid.uuid4().hex
+
+            self.req_queue.put(message, put_mqmd, put_opts)
+            logging.info("Put request message.  Message: [%s]" % message)
+
+            # Set up message descriptor for get.
+            get_mqmd = pymqi.MD()
+
+            # Set the get CorrelId to the put MsgId (which was set by MQ on the put1).
+            get_mqmd["CorrelId"] = put_mqmd["MsgId"]
+
+            # Set up the get options.
+            get_opts = pymqi.GMO(Options=CMQC.MQGMO_NO_SYNCPOINT +
+                                         CMQC.MQGMO_FAIL_IF_QUIESCING +
+                                         CMQC.MQGMO_WAIT)
+
+            # Version must be set to 2 to correlate.
+            get_opts["Version"] = CMQC.MQGMO_VERSION_2
+
+            # Tell MQ that we are matching on CorrelId.
+            get_opts["MatchOptions"] = CMQC.MQMO_MATCH_CORREL_ID
+
+            # Set the wait timeout of half a second.
+            get_opts["WaitInterval"] = 500
+
+            # Open the replyto queue and get response message,
+            replyto_queue = pymqi.Queue(self.qm, replyto_queue_name, CMQC.MQOO_INPUT_SHARED)
+            response_message = replyto_queue.get(None, get_mqmd, get_opts)
+
+            logging.info("Got response message [%s]" % response_message)
+
+            time.sleep(1)
+
+class ResponseProducer(Producer):
+    """ Instances of this class wait for request messages and produce responses.
+    """
+
+    def run(self):
+
+        # Request message descriptor, will be reset after processing each
+        # request message.
+        request_md = pymqi.MD()
+
+        # Get Message Options
+        gmo = pymqi.GMO()
+        gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+        gmo.WaitInterval = 500 # Half a second
+
+        queue = pymqi.Queue(self.qm, request_queue_name)
+
+        keep_running = True
+
+        while keep_running:
+            try:
+                # Wait up to to gmo.WaitInterval for a new message.
+                request_message = queue.get(None, request_md, gmo)
+
+                # Create a response message descriptor with the CorrelId
+                # set to the value of MsgId of the original request message.
+                response_md = pymqi.MD()
+                response_md.CorrelId = request_md.MsgId
+
+                response_message = "Response to message %s" % request_message
+                self.replyto_queue.put(response_message, response_md)
+
+                # Reset the MsgId, CorrelId & GroupId so that we can reuse
+                # the same 'md' object again.
+                request_md.MsgId = CMQC.MQMI_NONE
+                request_md.CorrelId = CMQC.MQCI_NONE
+                request_md.GroupId = CMQC.MQGI_NONE
+
+            except pymqi.MQMIError, e:
+                if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_NO_MSG_AVAILABLE:
+                    # No messages, that's OK, we can ignore it.
+                    pass
+                else:
+                    # Some other error condition.
+                    raise
+
+req = RequestProducer()
+resp = ResponseProducer()
+
+req.start()
+resp.start()
+
+try:
+    while True:
+        time.sleep(0.1)
+except KeyboardInterrupt:
+    req.qm.disconnect()
diff --git a/code/examples/put_message.py b/code/examples/put_message.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9wdXRfbWVzc2FnZS5weQ==
--- /dev/null
+++ b/code/examples/put_message.py
@@ -0,0 +1,20 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Hello from Python!"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+queue = pymqi.Queue(qmgr, queue_name)
+queue.put(message)
+queue.close()
+
+qmgr.disconnect()
diff --git a/code/examples/reply_to_queues.py b/code/examples/reply_to_queues.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9yZXBseV90b19xdWV1ZXMucHk=
--- /dev/null
+++ b/code/examples/reply_to_queues.py
@@ -0,0 +1,26 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import pymqi
+
+queue_manager = "QM01"
+channel = "SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+message = "Here's a reply"
+conn_info = "%s(%s)" % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+
+md = pymqi.MD()
+
+queue = pymqi.Queue(qmgr, queue_name)
+message = queue.get(None, md)
+
+reply_to_queue_name = md.ReplyToQ.strip()
+reply_to_queue = pymqi.Queue(qmgr, reply_to_queue_name)
+reply_to_queue.put(message)
+
+queue.close()
+qmgr.disconnect()
diff --git a/code/examples/set_auth_rec.py b/code/examples/set_auth_rec.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9zZXRfYXV0aF9yZWMucHk=
--- /dev/null
+++ b/code/examples/set_auth_rec.py
@@ -0,0 +1,32 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+import CMQC, CMQCFC, CMQXC
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = 'QM01'
+channel = 'CHANNEL.1'
+host = '127.0.0.1'
+port = '1434'
+conn_info = '%s(%s)' % (host, port)
+
+qmgr = pymqi.connect(queue_manager, channel, conn_info)
+pcf = pymqi.PCFExecute(qmgr)
+
+groupEntity ={128L: ['swww02']}
+authEntity = {128L: [CMQCFC.MQAUTH_BROWSE]}
+
+args = {CMQCFC.MQCACF_AUTH_PROFILE_NAME: 'Q1',
+        CMQCFC.MQIACF_OBJECT_TYPE: CMQC.MQOT_Q,
+        CMQCFC.MQIACF_AUTH_ADD_AUTHS: authEntity,
+        CMQCFC.MQCACF_GROUP_ENTITY_NAMES: groupEntity}
+
+
+result = pcf.MQCMD_SET_AUTH_REC(args)
+
+qmgr.disconnect()
+
diff --git a/code/examples/ssl_tls.py b/code/examples/ssl_tls.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9leGFtcGxlcy9zc2xfdGxzLnB5
--- /dev/null
+++ b/code/examples/ssl_tls.py
@@ -0,0 +1,42 @@
+# See discussion and more examples at http://packages.python.org/pymqi/examples.html
+# or in doc/sphinx/examples.rst in the source distribution.
+
+import logging
+
+import pymqi
+import CMQC
+
+logging.basicConfig(level=logging.INFO)
+
+queue_manager = "QM01"
+channel = "SSL.SVRCONN.1"
+host = "192.168.1.135"
+port = "1434"
+queue_name = "TEST.1"
+conn_info = "%s(%s)" % (host, port)
+ssl_cipher_spec = "TLS_RSA_WITH_AES_256_CBC_SHA"
+key_repo_location = "/var/mqm/ssl-db/client/KeyringClient"
+message = "Hello from Python!"
+
+cd = pymqi.CD()
+cd.ChannelName = channel
+cd.ConnectionName = conn_info
+cd.ChannelType = CMQC.MQCHT_CLNTCONN
+cd.TransportType = CMQC.MQXPT_TCP
+cd.SSLCipherSpec = ssl_cipher_spec
+
+sco = pymqi.SCO()
+sco.KeyRepository = key_repo_location
+
+qmgr = pymqi.QueueManager(None)
+qmgr.connect_with_options(queue_manager, cd, sco)
+
+put_queue = pymqi.Queue(qmgr, queue_name)
+put_queue.put(message)
+
+get_queue = pymqi.Queue(qmgr, queue_name)
+logging.info("Here's the message again: [%s]" % get_queue.get())
+
+put_queue.close()
+get_queue.close()
+qmgr.disconnect()
diff --git a/code/pymqe.c b/code/pymqe.c
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9weW1xZS5j
--- /dev/null
+++ b/code/pymqe.c
@@ -0,0 +1,1589 @@
+/***********************************************************
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Stichting Mathematisch
+Centrum or CWI or Corporation for National Research Initiatives or
+CNRI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+While CWI is the initial source for this software, a modified version
+is made available by the Corporation for National Research Initiatives
+(CNRI) at the Internet address ftp://ftp.python.org.
+
+STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
+CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+/*
+ * Python MQ Extension. Low level mqi wrappers. These present a
+ * low-level interface to the MQI 'C' library.
+ *
+ * Author: L. Smithson (lsmithson@open-networks.co.uk)
+ * Author: Dariusz Suchojad (dsuch at gefira.pl)
+ *
+ * DISCLAIMER
+ * You are free to use this code in any way you like, subject to the
+ * Python & IBM disclaimers & copyrights. I make no representations
+ * about the suitability of this software for any purpose. It is
+ * provided "AS-IS" without warranty of any kind, either express or
+ * implied. So there.
+ *
+ *
+ */
+
+static char __version__[] = "1.3";
+
+static char pymqe_doc[] = " \
+pymqe - A Python MQ Extension.  This presents a low-level Python \
+interface to the MQI 'C' library. Its usage and conventions are more \
+or less the same as the MQI 'C' language API. \
+ \
+MQI Connection & Object handles are passed around as Python \
+longs. Structure parameters (such as MQGMO) are passed as Python \
+string buffers. These buffers should be aligned & byte-ordered the \
+same way the native 'C' compiler does. (Hint: use the Python struct.py \
+package. See pymqi.py for an example). IN/OUT parameters are not\
+updated in place, but returned as parameters in a tuple.\
+\
+All calls return the MQI completion code & reason as the last two\
+elements of a tuple.\
+\
+The MQ verbs implemented here are:\
+  MQCONN, MQCONNX, MQDISC, MQOPEN, MQCLOSE, MQPUT, MQPUT1, MQGET,\
+  MQCMIT, MQBACK, MQBEGIN, MQINQ, MQSET, MQSUB, MQCRTMH, MQSETMP, MQINQMP\
+\
+The PCF MQAI call mqExecute is also implemented.\
+\
+The supported command levels (from 5.0 onwards) for the version of MQI \
+linked with this module are available in the tuple pymqe.__mqlevels__. \
+For a client build, pymqe.__mqbuild__ is set to the string 'client', otherwise \
+it is set to 'server'.\
+";
+
+
+#include <cmqc.h>
+#include <cmqxc.h>
+
+/*
+ * 64bit suppport courtesy of Brent S. Elmer, Ph.D. (mailto:webe3vt@aim.com)
+ *
+ * On 64 bit machines when MQ is compiled 64bit, MQLONG is an int defined
+ * in /opt/mqm/inc/cmqc.h or wherever your MQ installs to.
+ *
+ * On 32 bit machines, MQLONG is a long and many other MQ data types are
+ * set to MQLONG.
+ */
+
+
+/*
+ * Setup features. MQ Version string is added to the pymqe dict so
+ * that pymqi can find out what its been linked with.
+ */
+#ifdef MQCMDL_LEVEL_530
+#define PYMQI_FEATURE_MQAI
+#define PYMQI_FEATURE_SSL
+#endif
+
+
+
+#ifdef PYMQI_FEATURE_MQAI
+#include <cmqcfc.h>
+#include <cmqbc.h>
+#endif
+
+#include "Python.h"
+static PyObject *ErrorObj;
+
+/*
+ * MQI Structure sizes for the current supported MQ version are
+ * defined here for convenience. This allows older versions of pymqi
+ * to work with newer versions of MQI.
+ */
+
+#define PYMQI_MQCD_SIZEOF MQCD_CURRENT_LENGTH
+#define PYMQI_MQOD_SIZEOF MQOD_CURRENT_LENGTH
+#define PYMQI_MQMD_SIZEOF sizeof(MQMD)
+#define PYMQI_MQPMO_SIZEOF MQPMO_CURRENT_LENGTH
+#define PYMQI_MQGMO_SIZEOF sizeof(MQGMO)
+#ifdef PYMQI_FEATURE_SSL
+#define PYMQI_MQSCO_SIZEOF sizeof(MQSCO)
+#endif
+#ifdef MQCMDL_LEVEL_700
+#define PYMQI_MQSD_SIZEOF sizeof(MQSD)
+#define PYMQI_MQSRO_SIZEOF sizeof(MQSRO)
+#define PYMQI_MQCMHO_SIZEOF sizeof(MQCMHO)
+#define PYMQI_MQSMPO_SIZEOF sizeof(MQSMPO)
+#define PYMQI_MQIMPO_SIZEOF sizeof(MQIMPO)
+#define PYMQI_MQPD_SIZEOF sizeof(MQPD)
+#endif
+
+/* Macro for cleaning up MQAI filters-related object.
+*/
+#define PYMQI_MQAI_FILTERS_CLEANUP \
+  Py_XDECREF(filter_selector); \
+  Py_XDECREF(filter_operator); \
+  Py_XDECREF(filter_value); \
+  Py_XDECREF(_pymqi_filter_type); \
+  Py_XDECREF(filter);
+
+
+/* ----------------------------------------------------- */
+
+
+static int checkArgSize(size_t given, size_t expected, const char *name) {
+  if (given != expected) {
+    PyErr_Format(ErrorObj, "%s wrong size. Given: %lu, expected %lu", name, (unsigned long)given, (unsigned long)expected);
+    return 1;
+  }
+  return 0;
+}
+
+static char pymqe_MQCONN__doc__[] =
+"MQCONN(mgrName) \
+ \
+Calls the MQI MQCONN(mgrName) function to connect the Queue Manager \
+specified by the string mgrName. The tuple (handle, comp, reason) is \
+returned. Handle should be passed to subsequent calls to MQOPEN, etc.\
+";
+
+static PyObject * pymqe_MQCONN(PyObject *self, PyObject *args) {
+  char *name;
+  MQHCONN handle;
+  MQLONG compCode, compReason;
+
+  if (!PyArg_ParseTuple(args, "s", &name)) {
+    return NULL;
+  }
+  Py_BEGIN_ALLOW_THREADS
+  MQCONN(name, &handle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(lll)", (long) handle, (long) compCode, (long) compReason);
+}
+
+/*
+ * MQCONNX code courtesy of John OSullivan (mailto:jos@onebox.com)
+ * SSL additions couresy of Brian Vicente (mailto:sailbv@netscape.net)
+ * Connect options suggested by Jaco Smuts (mailto:JSmuts@clover.co.za)
+ */
+
+static char pymqe_MQCONNX__doc__[] =
+"MQCONNX(mgrName, options, mqcd, mqsco) \
+ \
+Calls the MQI MQCONNX(mgrName, options, mqcno) function to connect the Queue \
+Manager specified by the string mgrName using options with the channel descriptor \
+mqcd. The optional mqsco specifies SSL information. \
+The tuple (handle, comp, reason) is returned. Handle should be \
+passed to subsequent calls to MQOPEN, etc.\
+ \
+NOTE: The argument mqcd refers to the MQI MQCD structure, not MQCNO. \
+";
+
+static PyObject * pymqe_MQCONNX(PyObject *self, PyObject *args) {
+  char*    name = 0;
+  MQHCONN handle;
+  MQLONG compCode, compReason;
+  char*    mqcdBuf = 0;
+  int mqcdBufLen = 0;
+  MQCNO connectOpts = {MQCNO_DEFAULT};
+
+  /*  Note: MQLONG is an int on 64 bit platforms and MQHCONN is an MQLONG
+   */
+
+  long lOptions = MQCNO_NONE;
+
+#ifdef PYMQI_FEATURE_SSL
+  char *mqscoBuf = 0;
+  int mqscoBufLen = 0;
+
+  if (!PyArg_ParseTuple(args, "sls#|s#", &name, &lOptions, &mqcdBuf, &mqcdBufLen, &mqscoBuf, &mqscoBufLen)) {
+    return 0;
+  }
+  if (mqscoBuf && checkArgSize(mqscoBufLen, PYMQI_MQSCO_SIZEOF, "MQSCO")) {
+    return NULL;
+  }
+#else
+  if (!PyArg_ParseTuple(args, "sls#", &name, &lOptions, &mqcdBuf, &mqcdBufLen)) {
+    return 0;
+  }
+#endif
+
+  if (checkArgSize(mqcdBufLen, PYMQI_MQCD_SIZEOF, "MQCD")) {
+    return NULL;
+  }
+
+  /*
+   * Setup client connection fields appropriate to the version of MQ
+   * we've been built with.
+   */
+#ifdef PYMQI_FEATURE_SSL
+  connectOpts.Version = MQCNO_VERSION_4;
+  connectOpts.SSLConfigPtr =  (MQSCO*)mqscoBuf;
+#else
+  connectOpts.Version = MQCNO_VERSION_2;
+#endif
+
+  connectOpts.ClientConnPtr = (MQCD*)mqcdBuf;
+  connectOpts.Options = (MQLONG) lOptions;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQCONNX(name, &connectOpts, &handle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(lll)", (long) handle, (long) compCode, (long) compReason);
+}
+
+
+
+static char pymqe_MQDISC__doc__[] =
+"MQDISC(handle) \
+ \
+Calls the MQI MQDISC(handle) function to disconnect the Queue \
+Manager. The tuple (comp, reason) is returned. \
+";
+
+static PyObject * pymqe_MQDISC(PyObject *self, PyObject *args) {
+  MQHCONN handle;
+  MQLONG compCode, compReason;
+
+  /*  Note: MQLONG is an int on 64 bit platforms and MQHCONN is an MQLONG
+   */
+
+  long lHandle;
+
+  if (!PyArg_ParseTuple(args, "l", &lHandle)) {
+    return NULL;
+  }
+  handle = (MQHCONN) lHandle;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQDISC(&handle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+
+static char pymqe_MQOPEN__doc__[] =
+"MQOPEN(qMgr, qDesc, options) \
+\
+Calls the MQI MQOPEN(qMgr, qDesc, options) function to open the queue \
+specified by the MQOD structure in the string buffer qDesc. QMgr is \
+the Queue Manager handled returned by an earlier call to \
+MQCONN. Options are the options for opening the Queue. \
+ \
+The tuple (qHandle, qDesc, comp, reason) is returned, where qHandle is \
+the Queue Handle for the open queue and qDesc is the (possibly) \
+updated copy of the Queue MQOD structure. \
+ \
+If qDesc is not the size expected for an MQOD structure, an exception \
+is raised. \
+" ;
+
+static PyObject *pymqe_MQOPEN(PyObject *self, PyObject *args) {
+
+  MQOD *qDescP;
+  char *qDescBuffer;
+  int qDescBufferLength;
+  MQHOBJ qHandle;
+  MQLONG compCode, compReason;
+
+  long lOptions, lQmgrHandle;
+
+  if (!PyArg_ParseTuple(args, "ls#l", &lQmgrHandle, &qDescBuffer,
+            &qDescBufferLength, &lOptions)) {
+    return NULL;
+  }
+
+  qDescP = (MQOD *)qDescBuffer;
+  if (checkArgSize(qDescBufferLength, PYMQI_MQOD_SIZEOF, "MQOD")) {
+    return NULL;
+  }
+
+  Py_BEGIN_ALLOW_THREADS
+    MQOPEN((MQHCONN)lQmgrHandle, qDescP, (MQLONG) lOptions, &qHandle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ls#ll)", (long) qHandle, qDescP,
+                       PYMQI_MQOD_SIZEOF, (long) compCode, (long) compReason);
+}
+
+
+
+static char pymqe_MQCLOSE__doc__[] =
+"MQCLOSE(qMgr, qHandle, options) \
+ \
+Calls the MQI MQCLOSE(qMgr, qHandle, options) function to close the \
+queue referenced by qMgr & qHandle. The tuple (comp, reason), is \
+returned. \
+";
+
+static PyObject * pymqe_MQCLOSE(PyObject *self, PyObject *args) {
+  MQHOBJ qHandle;
+  MQLONG compCode, compReason;
+
+  /* Note: MQLONG is an int on 64 bit platforms and MQHCONN and MQHOBJ are MQLONG
+   */
+
+  long lOptions, lQmgrHandle, lqHandle;
+
+  if (!PyArg_ParseTuple(args, "lll", &lQmgrHandle, &lqHandle, &lOptions)) {
+    return NULL;
+  }
+  qHandle = (MQHOBJ) lqHandle;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQCLOSE((MQHCONN) lQmgrHandle, &qHandle, (MQLONG) lOptions, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+
+/*
+ * Internal function that calls either PUT or PUT1 according to the
+ * put1Flag arg
+ */
+static PyObject *mqputN(int put1Flag, PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+  char *mDescBuffer;
+  int mDescBufferLength;
+  MQMD *mDescP;
+  char *putOptsBuffer;
+  int putOptsBufferLength;
+  MQPMO *pmoP;
+  char *msgBuffer;
+  int msgBufferLength;
+  char *qDescBuffer;
+  int qDescBufferLength;
+  MQOD *qDescP = NULL;
+
+  long lQmgrHandle, lqHandle;
+
+  if (!put1Flag) {
+    /* PUT call, expects qHandle for an open q */
+    if (!PyArg_ParseTuple(args, "lls#s#s#", &lQmgrHandle, &lqHandle,
+              &mDescBuffer, &mDescBufferLength,
+              &putOptsBuffer, &putOptsBufferLength,
+              &msgBuffer, &msgBufferLength)) {
+      return NULL;
+    }
+  } else {
+    /* PUT1 call, expects od for a queue to be opened */
+    if (!PyArg_ParseTuple(args, "ls#s#s#s#", &lQmgrHandle,
+              &qDescBuffer, &qDescBufferLength,
+              &mDescBuffer, &mDescBufferLength,
+              &putOptsBuffer, &putOptsBufferLength,
+              &msgBuffer, &msgBufferLength)) {
+      return NULL;
+
+    }
+    if (checkArgSize(qDescBufferLength, PYMQI_MQOD_SIZEOF, "MQOD")) {
+      return NULL;
+    }
+    qDescP = (MQOD *)qDescBuffer;
+  }
+
+  if (checkArgSize(mDescBufferLength, PYMQI_MQMD_SIZEOF, "MQMD")) {
+    return NULL;
+  }
+  mDescP = (MQMD *)mDescBuffer;
+
+  if (checkArgSize(putOptsBufferLength, PYMQI_MQPMO_SIZEOF, "MQPMO")) {
+    return NULL;
+  }
+  pmoP = (MQPMO *)putOptsBuffer;
+  if (!put1Flag) {
+    Py_BEGIN_ALLOW_THREADS
+    MQPUT((MQHCONN) lQmgrHandle, (MQHOBJ) lqHandle, mDescP, pmoP, (MQLONG) msgBufferLength, msgBuffer,
+      &compCode, &compReason);
+    Py_END_ALLOW_THREADS
+  } else {
+    Py_BEGIN_ALLOW_THREADS
+    MQPUT1((MQHCONN) lQmgrHandle, qDescP, mDescP, pmoP, (MQLONG) msgBufferLength, msgBuffer,
+       &compCode, &compReason);
+    Py_END_ALLOW_THREADS
+  }
+  return Py_BuildValue("(s#s#ll)", mDescP, PYMQI_MQMD_SIZEOF,
+               pmoP, PYMQI_MQPMO_SIZEOF, (long) compCode, (long) compReason);
+}
+
+
+static char pymqe_MQPUT__doc__[] =
+"MQPUT(qMgr, qHandle, mDesc, options, msg) \
+ \
+Calls the MQI MQPUT(qMgr, qHandle, mDesc, putOpts, msg) function to \
+put msg on the queue referenced by qMgr & qHandle. The message msg may \
+contain embedded nulls. mDesc & putOpts are string buffers containing \
+a MQMD Message Descriptor structure and a MQPMO Put Message Option \
+structure. \
+ \
+The tuple (mDesc, putOpts, comp, reason) is returned, where mDesc & \
+putOpts are the (possibly) updated copies of the MQMD & MQPMO \
+structures. \
+ \
+If either mDesc or putOpts are the wrong size, an exception is raised. \
+";
+
+static PyObject *pymqe_MQPUT(PyObject *self, PyObject *args) {
+  return mqputN(0, self, args);
+}
+
+
+static char pymqe_MQPUT1__doc__[] =
+"MQPUT1(qMgr, qDesc, mDesc, options, msg) \
+ \
+Calls the MQI MQPUT1(qMgr, qDesc, mDesc, putOpts, msg) function to put \
+the message msg on the queue referenced by qMgr & qDesc. The message \
+msg may contain embedded nulls. mDesc & putOpts are string buffers \
+containing a MQMD Message Descriptor structure and a MQPMO Put Message \
+Option structure. \
+ \
+The tuple (mDesc, putOpts, comp, reason) is returned, where mDesc & \
+putOpts are the (possibly) updated copies of the MQMD & MQPMO \
+structures. \
+ \
+MQPUT1 is the optimal way to put a single message on a queue. It is \
+equivalent to calling MQOPEN, MQPUT and MQCLOSE. \
+ \
+If any of qDesc, mDesc or putOpts are the wrong size, an exception is \
+raised. \
+";
+
+static PyObject *pymqe_MQPUT1(PyObject *self, PyObject *args) {
+  return mqputN(1, self, args);
+}
+
+
+static char pymqe_MQGET__doc__[] =
+"MQGET(qMgr, qHandle, mDesc, getOpts, maxlen) \
+ \
+Calls the MQI MQGET(qMgr, qHandle, mDesc, getOpts, maxlen) function to \
+get a message from the queue referred to by qMgr & qHandle.  mDesc & \
+getOpts are string buffers containing a MQMD Message Descriptor and a \
+MQGMO Get Message Options structure. maxlen specified the maximum \
+length of messsage to read from the queue. If the message length \
+exceeds maxlen, the the behaviour is as defined by MQI. \
+ \
+The tuple (msg, mDesc, getOpts, actualLen, comp, reason) is returned, \
+where msg is a string containing the message read from the queue and \
+mDesc & getOpts are copies of the (possibly) updated MQMD & MQGMO \
+structures. actualLen is the actual length of the message in the \
+Queue. If this is bigger than maxlen, then as much data as possible is \
+copied into the return buffer. In this case, the message may or may \
+not be removed from the queue, depending on the MQGMO options. See the \
+MQI APG/APR for more details. \
+ \
+If mDesc or getOpts are the wrong size, an exception is raised. \
+";
+
+static PyObject *pymqe_MQGET(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+  char *mDescBuffer;
+  int mDescBufferLength;
+  MQMD *mDescP;
+  char *getOptsBuffer;
+  int getOptsBufferLength;
+  MQGMO *gmoP;
+  long maxLength, returnLength;
+  MQLONG actualLength;
+  char *msgBuffer;
+  PyObject *rv;
+
+  long lQmgrHandle, lqHandle;
+
+  if (!PyArg_ParseTuple(args, "lls#s#l", &lQmgrHandle, &lqHandle,
+            &mDescBuffer, &mDescBufferLength,
+            &getOptsBuffer, &getOptsBufferLength, &maxLength)) {
+    return NULL;
+  }
+  if (checkArgSize(mDescBufferLength, PYMQI_MQMD_SIZEOF, "MQMD")) {
+    return NULL;
+  }
+
+  mDescP = (MQMD *)mDescBuffer;
+
+  if (checkArgSize(getOptsBufferLength, PYMQI_MQGMO_SIZEOF, "MQGMO")) {
+    return NULL;
+  }
+  gmoP = (MQGMO *)getOptsBuffer;
+
+  /* Allocate temp. storage for message */
+  if (!(msgBuffer = malloc(maxLength))) {
+    PyErr_SetString(ErrorObj, "No memory for message");
+    return NULL;
+  }
+  actualLength = 0;
+  Py_BEGIN_ALLOW_THREADS
+  MQGET((MQHCONN) lQmgrHandle, (MQHOBJ) lqHandle, mDescP, gmoP, (MQLONG) maxLength, msgBuffer, &actualLength,
+    &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+
+  /*
+   * Message may be too big for caller's buffer, so only copy in as
+   * much data as will fit, but return the actual length of the
+   * message. Thanks to Maas-Maarten Zeeman for this fix.
+   */
+  if(actualLength >= maxLength) {
+    returnLength = maxLength;
+  } else {
+    returnLength = actualLength;
+  }
+
+  rv = Py_BuildValue("(s#s#s#lll)", msgBuffer, (int) returnLength,
+             mDescP, PYMQI_MQMD_SIZEOF, gmoP, PYMQI_MQGMO_SIZEOF,
+             (long) actualLength, (long) compCode, (long) compReason);
+  free(msgBuffer);
+  return rv;
+}
+
+
+static char pymqe_MQBEGIN__doc__[] =
+"MQBEGIN(handle)  \
+\
+Calls the MQI MQBEGIN(handle) function to begin a new global \
+transaction. This is used in conjunction with MQ coodinated \
+Distributed Transactions and XA resources. \
+ \
+The tuple (comp, reason) is returned.\
+";
+
+static PyObject * pymqe_MQBEGIN(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+  MQBO beginOpts = {MQBO_DEFAULT};
+
+  long lHandle;
+
+  if (!PyArg_ParseTuple(args, "l", &lHandle)) {
+    return NULL;
+  }
+  Py_BEGIN_ALLOW_THREADS
+  MQBEGIN((MQHCONN) lHandle, &beginOpts, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+
+static char pymqe_MQCMIT__doc__[] =
+"MQCMIT(handle) \
+ \
+Calls the MQI MQCMIT(handle) function to commit any pending gets or \
+puts in the current unit of work. The tuple (comp, reason) is \
+returned. \
+";
+
+static PyObject * pymqe_MQCMIT(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+
+  long lHandle;
+
+  if (!PyArg_ParseTuple(args, "l", &lHandle)) {
+    return NULL;
+  }
+  Py_BEGIN_ALLOW_THREADS
+  MQCMIT((MQHCONN) lHandle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+static char pymqe_MQBACK__doc__[] =
+"MQBACK(handle) \
+ \
+Calls the MQI MQBACK(handle) function to backout any pending gets or \
+puts in the current unit of work. The tuple (comp, reason) is \
+returned. \
+";
+
+static PyObject * pymqe_MQBACK(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+
+  long lHandle;
+
+  if (!PyArg_ParseTuple(args, "l", &lHandle)) {
+    return NULL;
+  }
+  Py_BEGIN_ALLOW_THREADS
+  MQBACK((MQHCONN) lHandle, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+
+/*
+ * MQINQ Interface. Only supports Inquire of single attribute.
+ */
+static char pymqe_MQINQ__doc__[] =
+"MQINQ(qMgr, handle, selector) \
+\
+Calls MQINQ with a single attribute. Returns the value of that \
+attribute. \
+";
+
+/*
+ * This figure plucked out of thin air + 1 added for null. Doesn't
+ * look like there's anything bigger than this in cmqc.h. I'm sure
+ * someone will tell me if I'm wrong.
+ */
+#define MAX_CHARATTR_LENGTH 129
+
+static PyObject *pymqe_MQINQ(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+  MQLONG selectorCount = 1;
+  MQLONG selectors[1];
+  MQLONG intAttrCount = 0;
+  MQLONG intAttrs[1];
+  MQLONG charAttrCount = 0;
+  MQCHAR charAttrs[MAX_CHARATTR_LENGTH];
+  PyObject *retVal = NULL;
+
+  long lQmgrHandle, lObjHandle, lSelectors[1];
+
+  if (!PyArg_ParseTuple(args, "lll", &lQmgrHandle, &lObjHandle, lSelectors)) {
+    return NULL;
+  }
+  selectors[0] = (MQLONG) lSelectors[0];
+
+  if ((selectors[0] >= MQIA_FIRST) && (selectors[0] <= MQIA_LAST)) {
+    intAttrCount = 1;
+  } else {
+    charAttrCount = sizeof(charAttrs) -1;
+    memset(charAttrs, 0, sizeof(charAttrs));
+  }
+
+  Py_BEGIN_ALLOW_THREADS
+  MQINQ((MQHCONN) lQmgrHandle, (MQHOBJ) lObjHandle, selectorCount, selectors,
+        intAttrCount, intAttrs, charAttrCount, charAttrs, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+
+  if (intAttrCount) {
+    retVal = Py_BuildValue("(lll)", (long) intAttrs[0], (long) compCode, (long) compReason);
+  } else {
+    retVal = Py_BuildValue("(sll)", charAttrs, (long) compCode, (long) compReason);
+  }
+  return retVal;
+}
+
+/*
+ * MQSET Interface. Only supports Set of single attribute.
+ */
+static char pymqe_MQSET__doc__[] =
+"MQSET(qMgr, handle, selector, val) \
+ \
+Calls MQSET with a single selector and attribute. \
+";
+
+static PyObject *pymqe_MQSET(PyObject *self, PyObject *args) {
+  MQLONG compCode, compReason;
+  MQLONG selectorCount = 1;
+  MQLONG selectors[1];
+  MQLONG intAttrCount = 0;
+  MQLONG intAttrs[1];
+  MQLONG charAttrCount = 0;
+  MQCHAR charAttrs[MAX_CHARATTR_LENGTH];
+  PyObject *attrArg = NULL;
+
+  long lQmgrHandle, lObjHandle, lSelectors[1];
+
+  if (!PyArg_ParseTuple(args, "lllO", &lQmgrHandle, &lObjHandle, lSelectors, &attrArg)) {
+    return NULL;
+  }
+  selectors[0] = (MQLONG) lSelectors[0];
+
+  if ((selectors[0] >= MQIA_FIRST) && (selectors[0] <= MQIA_LAST)) {
+    if (!PyLong_Check(attrArg)) {
+      PyErr_SetString(ErrorObj, "Arg is not a long integer");
+      return NULL;
+    }
+    intAttrs[0] = PyLong_AsLong(attrArg);
+    intAttrCount = 1;
+  } else {
+    if (!PyString_Check(attrArg)) {
+      PyErr_SetString(ErrorObj, "Arg is not a string");
+      return NULL;
+    }
+    strncpy(charAttrs, PyString_AsString(attrArg), MAX_CHARATTR_LENGTH);
+    charAttrCount = (MQLONG)strlen(charAttrs);
+  }
+
+  Py_BEGIN_ALLOW_THREADS
+  MQSET((MQHCONN) lQmgrHandle, (MQHOBJ) lObjHandle, selectorCount, selectors,
+        intAttrCount, intAttrs, charAttrCount, charAttrs, &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+  return Py_BuildValue("(ll)", (long) compCode, (long) compReason);
+}
+
+/* Publish/subscribe - Hannes Wagener 2011 */
+#ifdef MQCMDL_LEVEL_700
+
+static char pymqe_MQSUB__doc__[] =
+"MQSUB(connectionHandle, sd, objectHandle, subHandle, compCode, reasonCode) \
+ \
+Calls the MQI MQSUB(connectionHandle, subDesc, objectHandle, subHandle, compCode, reasonCode) \
+";
+
+static PyObject * pymqe_MQSUB(PyObject *self, PyObject *args) {
+  MQSD *subDescP;
+  MQHOBJ subHandle;
+  MQHOBJ objectHandle;
+  MQLONG compCode, compReason;
+  PyObject *rv;
+
+  char *subDescBuffer;
+  int subDescBufferLength;
+
+
+  long lQmgrHandle;
+
+  if (!PyArg_ParseTuple(args, "ls#l", &lQmgrHandle,
+            &subDescBuffer, &subDescBufferLength,
+            &objectHandle)) {
+    return NULL;
+  }
+  if (checkArgSize(subDescBufferLength, PYMQI_MQSD_SIZEOF, "MQSD")) {
+    return NULL;
+  }
+
+  subDescP = (MQSD *)subDescBuffer;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQSUB((MQHCONN) lQmgrHandle, subDescP, &objectHandle, &subHandle,
+    &compCode, &compReason);
+  Py_END_ALLOW_THREADS
+
+  rv = Py_BuildValue("(s#llll)", subDescP, PYMQI_MQSD_SIZEOF, objectHandle, subHandle,
+             (long) compCode, (long) compReason);
+  return rv;
+
+}
+
+#endif /* MQCMDL_LEVEL_700 */
+
+#ifdef PYMQI_FEATURE_MQAI
+
+/* Message properties and selectors - start */
+
+#ifdef MQCMDL_LEVEL_700
+
+static char pymqe_MQCRTMH__doc__[] =
+"MQCRTMH(conn_handle, cmho) \
+ \
+Calls the MQI's MQCRTMH function \
+";
+
+static PyObject* pymqe_MQCRTMH(PyObject *self, PyObject *args) {
+
+  long conn_handle;
+
+  char *cmho_buffer;
+  long cmho_buffer_length;
+
+  MQCMHO *cmho;
+  MQHMSG msg_handle = MQHM_UNUSABLE_HMSG;
+  MQLONG comp_code = MQCC_UNKNOWN, comp_reason = MQRC_NONE;
+
+  PyObject *rv;
+
+  if (!PyArg_ParseTuple(args, "ls#", &conn_handle, &cmho_buffer, &cmho_buffer_length)) {
+    return NULL;
+  }
+
+  if (checkArgSize(cmho_buffer_length, PYMQI_MQCMHO_SIZEOF, "MQCMHO")) {
+    return NULL;
+  }
+
+  cmho = (MQCMHO *)cmho_buffer;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQCRTMH(conn_handle, cmho, &msg_handle, &comp_code, &comp_reason);
+  Py_END_ALLOW_THREADS
+
+  rv = Py_BuildValue("(lll)", (long)comp_code, (long)comp_reason, (long)msg_handle);
+
+  return rv;
+}
+
+static char pymqe_MQSETMP__doc__[] =
+"MQSETMP(conn_handle, msg_handle, smpo, name, pd, type) \
+ \
+Calls the MQI's MQSETMP function \
+";
+
+static PyObject* pymqe_MQSETMP(PyObject *self, PyObject *args) {
+
+  long conn_handle, msg_handle;
+
+  char *smpo_buffer;
+  long smpo_buffer_length;
+
+  char *pd_buffer;
+  long pd_buffer_length;
+
+  MQSMPO *smpo;
+  MQPD *pd;
+
+  MQCHARV name = {MQCHARV_DEFAULT};
+  char *property_name;
+  long property_name_length = 0;
+
+  long property_type;
+
+  char *property_value;
+  long value_length;
+
+  MQLONG comp_code = MQCC_UNKNOWN, comp_reason = MQRC_NONE;
+  PyObject *rv;
+
+  if (!PyArg_ParseTuple(args, "lls#s#s#lsl", &conn_handle, &msg_handle, &smpo_buffer,
+                        &smpo_buffer_length,
+                        &property_name, &property_name_length,
+                        &pd_buffer, &pd_buffer_length, &property_type,
+                        &property_value, &value_length)) {
+    return NULL;
+  }
+
+  if (checkArgSize(smpo_buffer_length, PYMQI_MQSMPO_SIZEOF, "MQSMPO")) {
+    return NULL;
+  }
+
+  if (checkArgSize(pd_buffer_length, PYMQI_MQPD_SIZEOF, "MQPD")) {
+    return NULL;
+  }
+
+  smpo = (MQSMPO *)smpo_buffer;
+  pd = (MQPD *)pd_buffer;
+
+  name.VSPtr = property_name;
+  name.VSLength = property_name_length;
+
+  Py_BEGIN_ALLOW_THREADS
+  MQSETMP(conn_handle, msg_handle, smpo, &name, pd, property_type, value_length,
+            (MQBYTE *)property_value, &comp_code, &comp_reason);
+  Py_END_ALLOW_THREADS
+
+  rv = Py_BuildValue("(ll)", (long)comp_code, (long)comp_reason);
+  return rv;
+
+}
+
+static char pymqe_MQINQMP__doc__[] =
+"MQINQMP(conn_handle, msg_handle, smpo, name, pd, type, max_value_length) \
+ \
+Calls the MQI's MQINQMP function \
+";
+
+static PyObject* pymqe_MQINQMP(PyObject *self, PyObject *args) {
+
+  long conn_handle, msg_handle;
+  long impo_options, pd_options;
+
+  MQCHARV name = {MQCHARV_DEFAULT};
+  char *property_name;
+  long property_name_length = 0;
+
+  MQLONG property_type;
+  MQLONG actual_value_length;
+  long max_value_length;
+
+  MQLONG comp_code = MQCC_UNKNOWN, comp_reason = MQRC_NONE;
+  PyObject *rv;
+  
+  MQBYTE *value;
+  MQIMPO impo = {MQIMPO_DEFAULT};
+  MQPD pd = {MQPD_DEFAULT};
+
+  if (!PyArg_ParseTuple(args, "llls#lll", &conn_handle, &msg_handle, &impo_options,
+                        &property_name, &property_name_length, &pd_options,
+                        &property_type, &max_value_length)) {
+    return NULL;
+  }
+
+  value = malloc(max_value_length * sizeof(MQBYTE));
+  
+  impo.Options = impo_options;
+  pd.Options = pd_options;
+
+  name.VSPtr = property_name;
+  name.VSLength = property_name_length;
+
+  MQINQMP(conn_handle, msg_handle, &impo, &name, &pd, &property_type, sizeof(value),
+    value, &actual_value_length, &comp_code, &comp_reason);
+
+  rv = Py_BuildValue("(lls)", (long)comp_code, (long)comp_reason, (char *)value);
+  free(value);
+  
+  return rv;
+
+}
+
+#endif /* MQCMDL_LEVEL_700 */
+
+/* Message properties and selectors - end */
+
+
+
+static void cleanupBags(MQHBAG adminBag, MQHBAG responseBag) {
+  MQLONG compCode, compReason;
+  if (adminBag != MQHB_UNUSABLE_HBAG) {
+    mqDeleteBag(&adminBag, &compCode, &compReason);
+  }
+  if (responseBag != MQHB_UNUSABLE_HBAG) {
+    mqDeleteBag(&responseBag, &compCode, &compReason);
+  }
+}
+
+
+static char pymqe_mqaiExecute__doc__[] =
+"mqaiExecute(qMgr, cmd, args)\
+\
+Execute the PCF command 'cmd' on Queue Manager 'qMgr', with the \
+optional dictionary 'args'.  The command is a MQCMD_* code from \
+cmqcfc.h. The argument dictionary keys are the MQ[C|I]AC* codes from \
+cmqcfc.h. The dictionary values are either int or string, as \
+appropriate for the command. \
+ \
+The tuple (resultList, compCode, compReason) is returned. The \
+resultsList is a list of zero or more dictionaries for each of the \
+matching results. \
+";
+
+static PyObject *pymqe_mqaiExecute(PyObject *self, PyObject *args) {
+    PyObject* argDict = 0;
+    MQLONG compCode, compReason;
+    PyObject *argKeys;
+    MQHBAG adminBag = MQHB_UNUSABLE_HBAG;
+    MQHBAG responseBag = MQHB_UNUSABLE_HBAG;
+    MQHBAG resultBag;
+    PyObject *resultsList;
+    PyObject *pyItemIntVal;
+    PyObject *pyItemStrVal;
+    PyObject *returnValue;
+    PyObject *resultDictValue;
+    PyObject *newList;
+    
+    long lQmgrHandle, lCmdCode;
+    int isByteString = 0;
+    
+    /* Filters */
+    PyObject *filters = NULL;
+    PyObject *filter = NULL;
+    PyObject *filter_selector = NULL;
+    PyObject *filter_value = NULL;
+    PyObject *filter_operator = NULL;
+    PyObject *_pymqi_filter_type = NULL;
+    char *filter_type = NULL;
+    int filter_keys_size = 0;
+
+    if(!PyArg_ParseTuple(args, "ll|OO", &lQmgrHandle, &lCmdCode, &argDict, &filters)) {
+        return NULL;
+    }
+
+    if(argDict && !PyDict_Check(argDict)) {
+        PyErr_SetString(ErrorObj, "'argDict' is not a dictionary");
+        return NULL;
+    }
+    
+    if(filters && !PyList_Check(filters)) {
+        PyErr_SetString(ErrorObj, "'filters' is not a list");
+        return NULL;
+    }
+
+    resultsList = PyList_New(0);  /* Owned ref */
+    if(!resultsList) {
+        PyErr_SetString(ErrorObj, "Can't create results list");
+        return NULL;
+    }
+
+    do {
+
+        /*
+         * Create request + response bags
+         */
+        mqCreateBag(MQCBO_ADMIN_BAG, &adminBag, &compCode, &compReason);
+        if(compCode != MQCC_OK) {
+            break;
+        }
+
+        mqCreateBag(MQCBO_ADMIN_BAG, &responseBag, &compCode, &compReason);
+        if (compCode != MQCC_OK) {
+            break;
+        }
+        
+        /* 
+         * MQAI filters.
+         */
+        if(filters) {
+          
+          int i;
+          filter_keys_size = (int)PyList_Size(filters);
+          
+          for(i = 0; i < filter_keys_size; i++) {
+            filter = PyList_GetItem(filters, i); /* Borrowed ref */
+            if(NULL == filter) {
+              PyErr_Format(ErrorObj, "'filter' object is NULL.");
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+            
+            filter_selector = PyObject_GetAttrString(filter, "selector"); /* Owned ref */
+            if(NULL == filter_selector) {
+              PyErr_Format(ErrorObj, "'filter_selector' object is NULL.");
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+              
+            filter_operator = PyObject_GetAttrString(filter, "operator"); /* Owned ref */
+            if(NULL == filter_operator) {
+              PyErr_Format(ErrorObj, "'filter_operator' object is NULL.");
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+              
+            filter_value = PyObject_GetAttrString(filter, "value"); /* Owned ref */
+            if(NULL == filter_value) {
+              PyErr_Format(ErrorObj, "'filter_value' object is NULL.");
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+              
+            _pymqi_filter_type = PyObject_GetAttrString(filter, "_pymqi_filter_type"); /* Owned ref */
+            if(NULL == _pymqi_filter_type) {
+              PyErr_Format(ErrorObj, "'_pymqi_filter_type' object is NULL.");
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+              
+            filter_type = PyString_AsString(_pymqi_filter_type); 
+
+            /* String filter */
+            if(0 == strcmp(filter_type, "string")) {
+
+              mqAddStringFilter(adminBag, 
+                                  (MQLONG)PyLong_AsLong(filter_selector), 
+                                  (MQLONG)PyObject_Length(filter_value),
+                                  (PMQCHAR)PyString_AsString(filter_value), 
+                                  (MQLONG)PyLong_AsLong(filter_operator),
+                                  &compCode, 
+                                  &compReason); 
+                                  
+              if(!compCode == MQCC_OK) {
+                PyErr_Format(ErrorObj, "Could not invoke 'mqAddStringFilter' compCode=[%d], " \
+                            "compReason=[%d], filter_selector=[%d], filter_value=[%s], " \
+                            "filter_operator=[%d]", (int)compCode, (int)compReason, (int)PyLong_AsLong(filter_selector), 
+                                  PyString_AsString(filter_value), 
+                                  (int)PyLong_AsLong(filter_operator));
+                                  
+                PYMQI_MQAI_FILTERS_CLEANUP
+                return NULL;
+              }
+                                  
+              
+            }
+            
+            /* Integer filter */
+            else if(0 == strcmp(filter_type, "integer")) {
+              
+              mqAddIntegerFilter(adminBag, (MQLONG)PyLong_AsLong(filter_selector), 
+                                  (MQLONG)PyLong_AsLong(filter_value), 
+                                  (MQLONG)PyLong_AsLong(filter_operator), &compCode, &compReason); 
+                                  
+              if(!compCode == MQCC_OK) {
+                PyErr_Format(ErrorObj, "Could not invoke 'mqAddIntegerFilter' compCode=[%d], " \
+                            "compReason=[%d], filter_selector=[%d], filter_value=[%d], " \
+                            "filter_operator=[%d]", (int)compCode, (int)compReason, (int)PyLong_AsLong(filter_selector), 
+                                  (int)PyLong_AsLong(filter_value), 
+                                  (int)PyLong_AsLong(filter_operator));
+                                  
+                PYMQI_MQAI_FILTERS_CLEANUP
+                return NULL;
+              }
+            }
+            else {
+              PyErr_Format(ErrorObj, "Unrecognized filter type [%s].", filter_type);
+              PYMQI_MQAI_FILTERS_CLEANUP
+              return NULL;
+            }
+          }
+          /* All's good, let's clean up after ourselves. */
+          PYMQI_MQAI_FILTERS_CLEANUP
+        }
+        
+        /*
+         * For each arg key/value pair, create the appopriate type and add
+         * it to the bag.
+         */
+        if(argDict) {
+          argKeys = PyDict_Keys(argDict);
+          if(argDict && (argKeys)) {
+
+              MQLONG paramType = 0;
+              MQLONG intArg = 0;
+              MQCHAR *strArg = "";
+              MQBYTE *strByteArg = NULL;
+
+              int nKeys = (int)PyList_Size(argKeys); /* Owned ref */
+              int i;
+
+              for(i = 0; i < nKeys; i++) {
+                  PyObject *key = PyList_GetItem(argKeys, i);      /* Borrowed ref */
+                  PyObject *value = PyDict_GetItem(argDict, key);  /* Borrowed ref */
+
+                  /*
+                   * The key ought to be an int or a long. Blow up if it isn't
+                   */
+                  if(!PyLong_Check(key) && !PyInt_Check(key)) {
+                      PyObject *keyStr = PyObject_Str(key);  /* Owned ref */
+                      PyErr_Format(ErrorObj, "Argument: %s is not integer", PyString_AsString(keyStr));
+                      Py_XDECREF(keyStr);
+                      Py_DECREF(resultsList);
+                      cleanupBags(adminBag, responseBag);
+                      return NULL;
+                  }
+                  else {
+                      paramType = PyLong_Check(key) ? PyLong_AsLong(key) : PyInt_AsLong(key);
+                  }
+
+                  /*
+                   * Now get the value. It must be either a int/long or a string.
+                   */
+                   if (PyLong_Check(value)) {
+                       intArg = PyLong_AsLong(value);
+                       mqAddInteger(adminBag, paramType, intArg, &compCode, &compReason);
+                   } else if (PyInt_Check(value)) {
+                       intArg = PyInt_AsLong(value);
+                       mqAddInteger(adminBag, paramType, intArg, &compCode, &compReason);
+                   }
+                   else if (PyString_Check(value)) {
+                       strArg = PyString_AsString(value);
+                       mqAddString(adminBag, paramType, MQBL_NULL_TERMINATED, strArg, &compCode, &compReason);
+                  } else {
+                      isByteString = PyObject_HasAttrString(value, "pymqi_byte_string");
+                      if(1 == isByteString) {
+                        /* value is a ByteString.  have to use its "value" attribute */
+                        PyObject *byteStringValue;
+                        byteStringValue = PyObject_GetAttrString(value, "value"); /* Owned ref */
+                        strByteArg = (MQBYTE *)PyString_AsString(byteStringValue);
+
+#ifdef MQCMDL_LEVEL_700
+                        mqAddByteString(adminBag, paramType, (MQLONG)PyObject_Length(value), strByteArg, &compCode, &compReason);
+#endif /* MQCMDL_LEVEL_700 */
+
+                        Py_XDECREF(byteStringValue);
+                        }
+                      else {
+                        PyObject *keyStr = PyObject_Str(key);    /* Owned ref */
+                        PyObject *valStr = PyObject_Str(value);  /* Owned ref */
+                        PyErr_Format(ErrorObj, "Value %s for key %s is not a long, string nor a pymqi.ByteString instance",
+                                     PyString_AsString(valStr), PyString_AsString(keyStr));
+                        Py_XDECREF(keyStr);
+                        Py_XDECREF(valStr);
+                        Py_DECREF(resultsList);
+                        cleanupBags(adminBag, responseBag);
+                        return NULL;
+                      }
+                 }
+                 if(compCode != MQCC_OK) {
+                     break;
+                 }
+              }
+          }
+          Py_XDECREF(argKeys);
+        }
+
+        /*
+         * Everything bagged up -- Now execute the command
+         */
+        Py_BEGIN_ALLOW_THREADS
+            mqExecute((MQHCONN) lQmgrHandle, (MQLONG) lCmdCode, MQHB_NONE, adminBag, responseBag,
+                      MQHO_NONE, MQHO_NONE, &compCode, &compReason);
+        Py_END_ALLOW_THREADS
+
+        if(compCode != MQCC_OK) {
+            /*
+             * If the command execution failed at the Queue Manager, get
+             * the code & reason out and return them as an error.
+             */
+            if(compReason == MQRCCF_COMMAND_FAILED) {
+                mqInquireBag(responseBag, MQHA_BAG_HANDLE, 0, &resultBag, &compCode, &compReason);
+                if(compCode == MQCC_OK) {
+                    MQLONG mgrCompCode, mgrReasonCode;
+                    mqInquireInteger(resultBag, MQIASY_COMP_CODE, MQIND_NONE, &mgrCompCode, &compCode, &compReason);
+                    mqInquireInteger(resultBag, MQIASY_REASON, MQIND_NONE, &mgrReasonCode, &compCode, &compReason);
+                    if (compCode == MQCC_OK) {
+                        compCode = mgrCompCode;
+                        compReason = mgrReasonCode;
+                    }
+                }
+            }
+        break;
+        }
+
+        else {
+            /*
+             * Command executed OK. Get each user bag (if any) from the
+             * response, then get its contents. There is a bag for each
+             * matching result. Each bag gets a new dictionary, which is
+             * appended to the results list.
+             */
+             MQLONG numberOfBags;
+             mqCountItems(responseBag, MQHA_BAG_HANDLE, &numberOfBags, &compCode, &compReason);
+
+             if(compCode != MQCC_OK) {
+                 break;
+             }
+
+             else {
+                int i;
+                for (i = 0; i < numberOfBags; i++) {
+                    MQHBAG attrsBag;
+                    mqInquireBag(responseBag, MQHA_BAG_HANDLE, i, &attrsBag, &compCode, &compReason);
+
+                    if (compCode != MQCC_OK) {
+                        break;
+                    }
+
+                    else {
+                        /*
+                         * Query each item in the bag to find its type. We're
+                         * not interested in PCF System/bag stuff, we only want
+                         * the user stuff.
+                         */
+                        MQLONG numberOfItems;
+                        mqCountItems(attrsBag, MQSEL_ALL_USER_SELECTORS, &numberOfItems, &compCode, &compReason);
+
+                        if(compCode != MQCC_OK) {
+                            break;
+                        }
+
+                        else {
+
+                            int j;
+                            MQLONG itemType;
+                            MQLONG selector;
+                            PyObject *resultsDict = PyDict_New();  /* Owned ref - returned to interp */
+
+                            if(!resultsDict) {
+                                PyErr_SetString(ErrorObj, "Can't make results dict");
+                                cleanupBags(adminBag, responseBag);
+                                Py_DECREF(resultsList);
+                                return NULL;
+                            }
+
+                            for(j = 0; j < numberOfItems; j++) {
+                                /*
+                                 * Dratted IBM docs have the selector & itemType params swapped!
+                                 */
+                                mqInquireItemInfo(attrsBag, MQSEL_ANY_USER_SELECTOR, j, &selector, &itemType, &compCode, &compReason);
+                                if(compCode != MQCC_OK) {
+                                    break;
+                                }
+                                else {
+                                    /*
+                                     * The selector is the key, value depends on the
+                                     * type from the bag.
+                                     * Key and Value objects return ownded refs, but
+                                     * these are 'stolen' when added to the dict.
+                                     */
+                                    PyObject *key = PyLong_FromLong(selector);  /* Owned ref */
+
+                                    if(!key) {
+                                        PyErr_SetString(ErrorObj, "Can't make results dict key");
+                                        cleanupBags(adminBag, responseBag);
+                                        Py_DECREF(resultsList);
+                                        Py_XDECREF(resultsDict);
+                                        return NULL;
+                                    }
+
+                                    if(itemType == MQIT_INTEGER) {
+                                        MQLONG itemIntVal;
+                                        mqInquireInteger(attrsBag, MQSEL_ANY_USER_SELECTOR, j, &itemIntVal, &compCode, &compReason);
+
+                                        pyItemIntVal = PyLong_FromLong(itemIntVal);
+
+                                        if (PyDict_Contains(resultsDict, key) > 0)
+                                        {
+                                             resultDictValue = PyDict_GetItem(resultsDict, key);
+                                             if (PyList_Check(resultDictValue))
+                                              {
+                                                 PyList_Append(resultDictValue,pyItemIntVal);
+                                                 PyDict_SetItem(resultsDict, key, resultDictValue);
+                                             }
+                                             else
+                                             {
+                                                 newList = PyList_New(0);
+                                                 PyList_Append(newList, resultDictValue);
+                                                 PyList_Append(newList, pyItemIntVal);
+                                                 PyDict_SetItem(resultsDict, key, newList);
+                                                 Py_XDECREF(newList);
+                                                }
+                                        }
+                                        else
+                                        {
+                                            PyDict_SetItem(resultsDict, key, pyItemIntVal);
+                                        }
+
+                                        Py_XDECREF(pyItemIntVal);
+                                        Py_XDECREF(key);
+                                    }
+
+                                    else if(itemType == MQIT_STRING) {
+
+                                        MQCHAR *itemStrVal;
+                                        MQLONG strLength;
+                                        /*
+                                         * Two calls are needed - one to get the string
+                                         * length, and one to get the string itself.
+                                         */
+
+                                        /* 1st call */
+                                        mqInquireString(attrsBag, MQSEL_ANY_USER_SELECTOR, j, 0, 0, &strLength, 0, &compCode, &compReason);
+
+                                        if(compCode != MQCC_OK && compReason != MQRC_STRING_TRUNCATED) {
+                                            break;
+                                        }
+
+                                        strLength++;   /* + one for the Null */
+
+                                        if(!(itemStrVal = malloc(strLength))) {
+                                            PyErr_SetString(ErrorObj, "Out of memory");
+                                            cleanupBags(adminBag, responseBag);
+                                            Py_DECREF(resultsList);
+                                            Py_XDECREF(resultsDict);
+                                            Py_XDECREF(key);
+                                            return NULL;
+                                        }
+
+                                        /* 2nd call */
+                                        mqInquireString(attrsBag, MQSEL_ANY_USER_SELECTOR, j, strLength, itemStrVal,
+                                                        &strLength, 0, &compCode, &compReason);
+
+                                        if(compCode != MQCC_OK) {
+                                            break;
+                                        }
+
+                                        itemStrVal[strLength] = 0;
+
+                                        pyItemStrVal = PyString_FromString(itemStrVal);
+
+                                        if (PyDict_Contains(resultsDict, key) > 0) {
+                                              resultDictValue = PyDict_GetItem(resultsDict, key);
+                                              if (PyList_Check(resultDictValue)) {
+                                                  PyList_Append(resultDictValue,pyItemStrVal);
+                                                  PyDict_SetItem(resultsDict, key, resultDictValue);
+                                              }
+                                              else {
+                                                  newList = PyList_New(0);
+                                                  PyList_Append(newList, resultDictValue);
+                                                  PyList_Append(newList, pyItemStrVal);
+                                                  PyDict_SetItem(resultsDict, key, newList);
+                                                  Py_XDECREF(newList);
+                                              }
+                                        }
+                                        else {
+                                          PyDict_SetItem(resultsDict, key, pyItemStrVal);
+                                        }
+
+                                        free(itemStrVal);
+                                        Py_XDECREF(key);
+                                        Py_XDECREF(pyItemStrVal);
+
+                                    }
+
+#ifdef MQCMDL_LEVEL_700
+                                    else if(itemType == MQITEM_BYTE_STRING) {
+
+                                        MQBYTE *itemByteStrVal;
+                                        MQLONG byteStrLength;
+                                        /*
+                                         * Two calls are needed - one to get the byte string
+                                         * length, and one to get the byte string itself.
+                                         */
+
+                                        /* 1st call */
+                                        mqInquireByteString(attrsBag, MQSEL_ANY_USER_SELECTOR, j, 0, 0, &byteStrLength, &compCode, &compReason);
+
+                                        if(compCode != MQCC_OK && compReason != MQRC_STRING_TRUNCATED) {
+                                            break;
+                                        }
+
+                                        byteStrLength++;   /* + one for the Null */
+
+                                        if(!(itemByteStrVal = malloc(byteStrLength))) {
+                                            PyErr_SetString(ErrorObj, "Out of memory");
+                                            cleanupBags(adminBag, responseBag);
+                                            Py_DECREF(resultsList);
+                                            Py_XDECREF(resultsDict);
+                                            Py_XDECREF(key);
+                                            return NULL;
+                                        }
+
+                                        /* 2nd call */
+                                        mqInquireByteString(attrsBag, MQSEL_ANY_USER_SELECTOR, j, byteStrLength, itemByteStrVal,
+                                                        &byteStrLength, &compCode, &compReason);
+
+                                        if(compCode != MQCC_OK) {
+                                            break;
+                                        }
+
+                                        /*byte strings may contain nulls */
+                                        pyItemStrVal = PyString_FromStringAndSize((char *)itemByteStrVal, byteStrLength);
+                                        PyDict_SetItem(resultsDict, key, pyItemStrVal);
+
+                                        free(itemByteStrVal);
+                                        Py_XDECREF(key);
+                                        Py_XDECREF(pyItemStrVal);
+
+                                    }
+#endif /* MQCMDL_LEVEL_700 */
+
+                                    else {
+                                        /*
+                                         * Must be a bag. What to do? Maybe recurse into it?
+                                         */
+                                        PyErr_SetString(ErrorObj, "Bag in a Bag. Send clue to http://packages.python.org/pymqi/support-consulting-contact.html");
+                                        cleanupBags(adminBag, responseBag);
+                                        Py_XDECREF(key);
+                                        Py_DECREF(resultsList);
+                                        return NULL;
+                                    }
+                                }
+                            }
+
+                        /*
+                         * Append the results to the returned list
+                         */
+                        PyList_Append(resultsList, resultsDict);
+                        Py_XDECREF(resultsDict);
+                        }
+                    }
+                }
+            }
+        }
+        break;
+
+    } while (1);
+    cleanupBags(adminBag, responseBag);
+
+    returnValue = Py_BuildValue("(Oll)", resultsList, (long) compCode, (long) compReason);
+    Py_XDECREF(resultsList);
+
+    return returnValue;
+}
+#endif
+
+
+/* List of methods defined in the module */
+
+static struct PyMethodDef pymqe_methods[] = {
+  {"MQCONN", (PyCFunction)pymqe_MQCONN,    METH_VARARGS, pymqe_MQCONN__doc__},
+  {"MQCONNX", (PyCFunction)pymqe_MQCONNX, METH_VARARGS, pymqe_MQCONNX__doc__},
+  {"MQDISC", (PyCFunction)pymqe_MQDISC,    METH_VARARGS, pymqe_MQDISC__doc__},
+  {"MQOPEN", (PyCFunction)pymqe_MQOPEN,    METH_VARARGS, pymqe_MQOPEN__doc__},
+  {"MQCLOSE", (PyCFunction)pymqe_MQCLOSE, METH_VARARGS, pymqe_MQCLOSE__doc__},
+  {"MQPUT", (PyCFunction)pymqe_MQPUT, METH_VARARGS, pymqe_MQPUT__doc__},
+  {"MQPUT1", (PyCFunction)pymqe_MQPUT1, METH_VARARGS, pymqe_MQPUT1__doc__},
+  {"MQGET", (PyCFunction)pymqe_MQGET, METH_VARARGS, pymqe_MQGET__doc__},
+  {"MQBEGIN", (PyCFunction)pymqe_MQBEGIN, METH_VARARGS, pymqe_MQBEGIN__doc__},
+  {"MQCMIT", (PyCFunction)pymqe_MQCMIT, METH_VARARGS, pymqe_MQCMIT__doc__},
+  {"MQBACK", (PyCFunction)pymqe_MQBACK, METH_VARARGS, pymqe_MQBACK__doc__},
+  {"MQINQ", (PyCFunction)pymqe_MQINQ, METH_VARARGS, pymqe_MQINQ__doc__},
+  {"MQSET", (PyCFunction)pymqe_MQSET, METH_VARARGS, pymqe_MQSET__doc__},
+#ifdef  PYMQI_FEATURE_MQAI
+  {"mqaiExecute", (PyCFunction)pymqe_mqaiExecute, METH_VARARGS, pymqe_mqaiExecute__doc__},
+#endif
+#ifdef MQCMDL_LEVEL_700
+  {"MQSUB", (PyCFunction)pymqe_MQSUB, METH_VARARGS, pymqe_MQSUB__doc__},
+  {"MQCRTMH", (PyCFunction)pymqe_MQCRTMH, METH_VARARGS, pymqe_MQCRTMH__doc__},
+  {"MQSETMP", (PyCFunction)pymqe_MQSETMP, METH_VARARGS, pymqe_MQSETMP__doc__},
+  {"MQINQMP", (PyCFunction)pymqe_MQINQMP, METH_VARARGS, pymqe_MQINQMP__doc__},
+#endif
+  {NULL, (PyCFunction)NULL, 0, NULL}        /* sentinel */
+};
+
+
+/* Initialization function for the module (*must* be called initpymqe) */
+
+static char pymqe_module_documentation[] =
+""
+;
+
+#ifdef WIN32
+__declspec(dllexport)
+#endif
+     void initpymqe(void) {
+  PyObject *m, *d;
+
+  /* Create the module and add the functions */
+  m = Py_InitModule4("pymqe", pymqe_methods,
+             pymqe_module_documentation,
+             (PyObject*)NULL,PYTHON_API_VERSION);
+
+  /* Add some symbolic constants to the module */
+  d = PyModule_GetDict(m);
+  ErrorObj = PyErr_NewException("pymqe.error", NULL, NULL);
+  PyDict_SetItemString(d, "pymqe.error", ErrorObj);
+
+  PyDict_SetItemString(d, "__doc__", PyString_FromString(pymqe_doc));
+  PyDict_SetItemString(d,"__version__", PyString_FromString(__version__));
+
+  /*
+   * Build the tuple of supported command levels, but only for versions
+   *  5.* onwards
+   */
+  {
+    PyObject *versions = PyList_New(0);
+#ifdef MQCMDL_LEVEL_500
+      PyList_Append(versions, PyString_FromString("5.0"));
+#endif
+#ifdef MQCMDL_LEVEL_510
+      PyList_Append(versions, PyString_FromString("5.1"));
+#endif
+#ifdef MQCMDL_LEVEL_520
+      PyList_Append(versions, PyString_FromString("5.2"));
+#endif
+#ifdef MQCMDL_LEVEL_530
+      PyList_Append(versions, PyString_FromString("5.3"));
+#endif
+#ifdef MQCMDL_LEVEL_600
+      PyList_Append(versions, PyString_FromString("6.0"));
+#endif
+#ifdef MQCMDL_LEVEL_700
+      PyList_Append(versions, PyString_FromString("7.0"));
+#endif
+#ifdef MQCMDL_LEVEL_710
+      PyList_Append(versions, PyString_FromString("7.1"));
+#endif
+#ifdef MQCMDL_LEVEL_750
+      PyList_Append(versions, PyString_FromString("7.5"));
+#endif
+#ifdef MQCMDL_LEVEL_710
+      PyList_Append(versions, PyString_FromString("7.1"));
+#endif
+#ifdef MQCMDL_LEVEL_750
+      PyList_Append(versions, PyString_FromString("7.5"));
+#endif
+      PyDict_SetItemString(d,"__mqlevels__", PyList_AsTuple(versions));
+      Py_XDECREF(versions);
+  }
+
+  /*
+   * Set the client/server build flag
+   */
+#if PYQMI_SERVERBUILD == 1
+  PyDict_SetItemString(d,"__mqbuild__", PyString_FromString("server"));
+#else
+  PyDict_SetItemString(d,"__mqbuild__", PyString_FromString("client"));
+#endif
+
+  /* Check for errors */
+  if (PyErr_Occurred())
+    Py_FatalError("can't initialize module pymqe");
+}
diff --git a/code/pymqi.py b/code/pymqi.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9weW1xaS5weQ==
--- /dev/null
+++ b/code/pymqi.py
@@ -0,0 +1,2435 @@
+# Python MQI Class Wrappers. High level classes that for the MQI
+# Extension. These present an object interface to MQI.
+#
+# Author: L. Smithson (lsmithson@open-networks.co.uk)
+# Author: Dariusz Suchojad (dsuch at gefira.pl)
+#
+# DISCLAIMER
+# You are free to use this code in any way you like, subject to the
+# Python & IBM disclaimers & copyrights. I make no representations
+# about the suitability of this software for any purpose. It is
+# provided "AS-IS" without warranty of any kind, either express or
+# implied. So there.
+#
+"""
+PyMQI - Python MQI Wrapper Classes
+
+These classes wrap the pymqe low level MQI calls. They present an OO
+interface with a passing resemblance MQI C++.
+
+Classes are also provided for easy use of the MQI structure parameters
+(MQMD, MQGMO etc.) from Python. These allow Python scripts to set/get
+structure members by attribute, dictionary etc.
+
+The classes are:
+
+    * MQOpts - Base class for defining MQI parameter structures.
+    * CD - MQI MQCD structure class
+    * CMHO - MQI MQCMHO structure class
+    * MD - MQI MQMD structure class
+    * GMO - MQI MQGMO structure class.
+    * IMPO - MQI MQIMPO structure class
+    * OD - MQI MQOD structure class.
+    * PD - MQI MQPD structure class.
+    * PMO - MQI MQPMO structure class.
+    * RFH2 - MQI MQRFH2 structure class.
+    * SCO - MQI MQSCO structure class
+    * SMPO - MQI MQSMPO structure class
+    * SRO - MQI MQSRO structure class
+    * SD - MQI MQSD structure class
+    * TM - MQI MQTM structure class
+    * TMC2- MQI MQTMC2 structure class
+    * Filter/StringFilter/IntegerFilter - PCF/MQAI filters
+    * QueueManager - Queue Manager operations
+    * Queue - Queue operations
+    * Topic - Publish/subscribe topic operations
+    * Subscription - Publish/subscribe subscription operations
+    * PCFExecute - Programmable Command Format operations
+    * Error - Base class for pymqi errors.
+    * MQMIError - MQI specific error
+    * PYIFError - Pymqi error
+
+The following MQI operations are supported:
+
+    * MQCONN, MQDISC (QueueManager.connect()/QueueManager.disconnect())
+    * MQCONNX (QueueManager.connectWithOptions())
+    * MQOPEN/MQCLOSE (Queue.open(), Queue.close(), Topic.open(), Topic.close())
+    * MQPUT/MQPUT1/MQGET (Queue.put(), QueueManager.put1(), Queue.get())
+    * MQCMIT/MQBACK (QueueManager.commit()/QueueManager.backout())
+    * MQBEGIN (QueueuManager.begin())
+    * MQINQ (QueueManager.inquire(), Queue.inquire())
+    * MQSET (Queue.set())
+    * MQSUB (Subscription.sub())
+    * And various MQAI PCF commands.
+
+The supported command levels (from 5.0 onwards) for the version of MQI
+linked with this module are available in the tuple pymqi.__mqlevels__.
+For a client build, pymqi.__mqbuild__ is set to the string 'client',
+otherwise it is set to 'server'.
+
+To use this package, connect to the Queue Manager (using
+QueueManager.connect()), then open a queue (using Queue.open()). You
+may then put or get messages on the queue (using Queue.put(),
+Queue.get()), as required.
+
+Where possible, pymqi assumes the MQI defaults for all parameters.
+
+Like MQI C++, pymqi can defer a queue connect until the put/get call.
+
+Pymqi maps all MQI warning & error status to the MQMIError
+exception. Errors detected by pymqi itself raise the PYIFError
+exception. Both these exceptions are subclasses of the Error class.
+
+MQI constants are defined in the CMQC module. PCF constants are
+defined in CMQCFC.
+
+PCF commands and inquiries are executed by calling a MQCMD_* method on
+an instance of a PCFExecute object.
+
+Pymqi is thread safe. Pymqi objects have the same thread scope as
+their MQI counterparts.
+
+"""
+
+# Stdlib
+import struct
+import exceptions
+import types
+import threading
+import ctypes
+# import xml parser.  lxml/etree only available since python 2.5
+use_minidom = False
+try:
+    import lxml.etree
+except Exception:
+    from xml.dom.minidom import parseString
+    use_minidom = True
+
+# PyMQI
+import pymqe, CMQC, CMQCFC, CMQXC
+
+__version__ = "1.3"
+__mqlevels__ = pymqe.__mqlevels__
+__mqbuild__ = pymqe.__mqbuild__
+
+
+#
+# 64bit suppport courtesy of Brent S. Elmer, Ph.D. (mailto:webe3vt@aim.com)
+#
+# On 64 bit machines when MQ is compiled 64bit, MQLONG is an int defined
+# in /opt/mqm/inc/cmqc.h or wherever your MQ installs to.
+#
+# On 32 bit machines, MQLONG is a long and many other MQ data types are set to MQLONG
+#
+# So, set MQLONG_TYPE to 'i' for 64bit MQ and 'l' for 32bit MQ so that the
+# conversion from the Python data types to C data types in the MQ structures
+# will work correctly.
+#
+
+# Are we running 64 bit?
+if struct.calcsize("P") == 8:
+    MQLONG_TYPE = 'i' # 64 bit
+else:
+    MQLONG_TYPE = 'l' # 32 bit
+
+#######################################################################
+#
+
+# MQI Python<->C Structure mapping. MQI uses lots of parameter passing
+# structures in its API. These classes are used to set/get the
+# parameters in the style of Python dictionaries & keywords. Pack &
+# unpack calls are used to convert between python class attributes and
+# 'C' structures, suitable for passing in/out of C functions.
+#
+# The MQOpts class defines common operations for structure definition,
+# default values setting, member set/get and translation to & from 'C'
+# structures. Specializations construct MQOpts with a list specifying
+# structure member names, their default values, and pack/unpack
+# formats. MQOpts uses this list to setup class attributes
+# corresponding to the structure names, set up attribute defaults, and
+# builds a format string usable by the struct package to translate to
+# 'C' structures.
+#
+#######################################################################
+
+
+class MQOpts:
+    """Base class for packing/unpacking MQI Option structures. It is
+    constructed with a list defining the member/attribute name,
+    default value (from the CMQC module) and the member pack format
+    (see the struct module for the formats). The list format is:
+
+      [['Member0', CMQC.DEFAULT_VAL0, 'fmt1']
+       ['Member1', CMQC.DEFAULT_VAL1, 'fmt2']
+         ...
+      ]
+
+    MQOpts defines common methods to allow structure members to be
+    set/get as attributes (foo.Member0 = 42), set/get as dictionary
+    items (foo['Member0'] = 42) or set as keywords (foo.set(Member0 =
+    42, Member1 = 'flipperhat'). The ctor can be passed an optional
+    keyword list to initialize the structure members to non-default
+    values. The get methods returns all attributes as a dictionary.
+
+    The pack() method packs all members into a 'C' structure according
+    to the format specifiers passed to the ctor. The packing order is
+    as specified in the list passed to the ctor. Pack returns a string
+    buffer, which can be passed directly to the MQI 'C' calls.
+
+    The unpack() method does the opposite of pack. It unpacks a string
+    buffer into an MQOpts instance.
+
+    Applications are not expected to use MQOpts directly. Instead,
+    MQOpts is sub-classed as particular MQI structures."""
+
+    def __init__(self, list, **kw):
+        """MQOpts(memberList [,**kw])
+
+        Initialise the option structure. 'list' is a list of structure
+    member names, default values and pack/unpack formats. 'kw' is an
+    optional keyword dictionary that may be used to override default
+    values set by MQOpts sub-classes."""
+
+        self.__list = list[:]
+        self.__format = ''
+        # Creat the structure members as instance attributes and build
+        # the struct.pack/unpack format string. The attribute name is
+        # identical to the 'C' structure member name.
+        for i in list:
+            setattr(self, i[0], i[1])
+            self.__format = self.__format + i[2]
+        apply(MQOpts.set, (self,), kw)
+
+    def pack(self):
+        """ pack()
+
+        Pack the attributes into a 'C' structure to be passed to MQI
+        calls. The pack order is as defined to the MQOpts
+        ctor. Returns the structure as a string buffer"""
+
+        # Build tuple for struct.pack() argument. Start with format
+        # string.
+        args = [self.__format]
+        # Now add the current attribute values to the tuple
+        for i in self.__list:
+            v = getattr(self, i[0])
+            # Flatten attribs that are arrays
+            if type(v) is types.ListType:
+                for x in v:
+                    args.append(x)
+            else:
+                args.append(v)
+        return apply(struct.pack, args)
+
+    def unpack(self, buff):
+        """unpack(buff)
+
+        Unpack a 'C' structure 'buff' into self."""
+
+        # Unpack returns a tuple of the unpacked data, in the same
+        # order (I hope!) as in the ctor's list arg.
+        r = struct.unpack(self.__format, buff)
+        x = 0
+        for i in self.__list:
+            setattr(self, i[0], r[x])
+            x = x + 1
+
+    def set(self, **kw):
+        """set(**kw)
+
+        Set a structure member using the keyword dictionary 'kw'. An
+        AttributeError exception is raised for invalid member
+        names."""
+
+        for i in kw.keys():
+            # Only set if the attribute already exists. getattr raises
+            # an exception if it doesn't.
+            getattr(self, str(i))
+            setattr(self, str(i), kw[i])
+
+    def __setitem__(self, key, value):
+        """__setitem__(key, value)
+
+        Set the structure member attribute 'key' to 'value', as in
+        obj['Flop'] = 42.
+        """
+
+        # Only set if the attribute already exists. getattr raises an
+        # exception if it doesn't.
+        getattr(self, key)
+        setattr(self, key, value)
+
+    def get(self):
+        """get()
+
+        Return a dictionary of the current structure member
+        values. The dictionary is keyed by a 'C' member name."""
+
+        d = {}
+        for i in self.__list:
+            d[i[0]] = getattr(self, i[0])
+        return d
+
+    def __getitem__(self, key):
+        """__getitem__(key)
+
+        Return the member value associated with key, as in print
+        obj['Flop']."""
+        return getattr(self, key)
+
+    def __str__(self):
+        """__str__()
+
+        Pretty Print Structure."""
+
+        rv = ''
+        for i in self.__list:
+            rv = rv + str(i[0]) + ': ' + str(getattr(self, i[0])) + '\n'
+        # Chop the trailing newline
+        return rv[:-1]
+
+    def __repr__(self):
+        """__repr__()
+
+        Return the packed buffer as a printable string."""
+        return str(self.pack())
+
+    def get_length(self):
+        """get_length()
+
+        Returns the length of the (would be) packed buffer.
+
+        """
+
+        return struct.calcsize(self.__format)
+
+    def set_vs(self, vs_name, vs_value=None, vs_offset=0, vs_buffer_size=0,
+               vs_ccsid=0):
+        """set_vs(vs_name, vs_value, vs_offset, vs_buffer_size, vs_ccsid)
+
+        This method aids in the setting of the MQCHARV (variable length
+        string) types in MQ structures.  The type contains a pointer to a
+        variable length string.  A common example of a MQCHARV type
+        is the ObjectString in the MQOD structure.
+        In pymqi the ObjectString is defined as 5 separate
+        elements (as per MQCHARV):
+        ObjectStringVSPtr - Pointer
+        ObjectStringVSOffset - Long
+        ObjectStringVSBufSize - Long
+        ObjectStringVSLength - Long
+        ObjectStringVSCCSID - Long
+
+        """
+
+        vs_name_vsptr = ""
+        #if the VSPtr name is passed - remove VSPtr to be left with name.
+        if vs_name.endswith("VSPtr"):
+            vs_name_vsptr = vs_name
+        else:
+            vs_name_vsptr = vs_name + "VSPtr"
+
+        vs_name_vsoffset = vs_name + "VSOffset"
+        vs_name_vsbuffsize = vs_name + "VSBufSize"
+        vs_name_vslength = vs_name + "VSLength"
+        vs_name_vsccsid = vs_name + "VSCCSID"
+
+        c_vs_value = None
+        c_vs_value_p = 0
+
+        if vs_value is not None:
+            c_vs_value = ctypes.create_string_buffer(vs_value)
+            c_vs_value_p = ctypes.cast(c_vs_value, ctypes.c_void_p).value
+
+        self[vs_name_vsptr] = c_vs_value_p
+        self[vs_name_vsoffset] = vs_offset
+        self[vs_name_vsbuffsize] = vs_buffer_size
+        self[vs_name_vslength] = len(vs_value)
+        self[vs_name_vsccsid] = vs_ccsid
+
+    def get_vs(self, vs_name):
+        """get_vs(vs_name)
+
+        This method returns the string to which the VSPtr pointer points to.
+
+        """
+
+        vs_name_vsptr = ""
+        #if the VSPtr name is passed - remove VSPtr to be left with name.
+        if vs_name.endswith("VSPtr"):
+            vs_name_vsptr = vs_name
+        else:
+            vs_name_vsptr = vs_name + "VSPtr"
+
+        c_vs_value = None
+        c_vs_value_p = self[vs_name_vsptr]
+        if c_vs_value_p != 0:
+            c_vs_value = ctypes.cast(c_vs_value_p, ctypes.c_char_p).value
+
+        return c_vs_value
+
+
+#
+# Sub-classes of MQOpts representing real MQI structures.
+#
+
+class gmo(MQOpts):
+    """gmo(**kw)
+
+    Construct a MQGMO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQGMO_STRUC_ID, '4s'],
+            ['Version', CMQC.MQGMO_VERSION_1, MQLONG_TYPE],
+            ['Options', CMQC.MQGMO_NO_WAIT, MQLONG_TYPE],
+            ['WaitInterval', 0, MQLONG_TYPE],
+            ['Signal1', 0, MQLONG_TYPE],
+            ['Signal2', 0, MQLONG_TYPE],
+            ['ResolvedQName', '', '48s'],
+            ['MatchOptions', CMQC.MQMO_MATCH_MSG_ID+CMQC.MQMO_MATCH_CORREL_ID, MQLONG_TYPE],
+            ['GroupStatus', CMQC.MQGS_NOT_IN_GROUP, 'b'],
+            ['SegmentStatus', CMQC.MQSS_NOT_A_SEGMENT, 'b'],
+            ['Segmentation', CMQC.MQSEG_INHIBITED, 'b'],
+            ['Reserved1', ' ', 'c'],
+            ['MsgToken', '', '16s'],
+            ['ReturnedLength', CMQC.MQRL_UNDEFINED, MQLONG_TYPE],]
+
+        if "7.0" in pymqe.__mqlevels__:
+            opts += [
+                ['Reserved2', 0L, MQLONG_TYPE],
+                ['MsgHandle', 0L, 'q']]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+# Backward compatibility
+GMO = gmo
+
+
+class pmo(MQOpts):
+    """pmo(**kw)
+
+    Construct a MQPMO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        opts = [
+            ['StrucId', CMQC.MQPMO_STRUC_ID, '4s'],
+            ['Version', CMQC.MQPMO_VERSION_1, MQLONG_TYPE],
+            ['Options', CMQC.MQPMO_NONE, MQLONG_TYPE],
+            ['Timeout', -1, MQLONG_TYPE],
+            ['Context', 0, MQLONG_TYPE],
+            ['KnownDestCount', 0, MQLONG_TYPE],
+            ['UnknownDestCount', 0, MQLONG_TYPE],
+            ['InvalidDestCount', 0, MQLONG_TYPE],
+            ['ResolvedQName', '', '48s'],
+            ['ResolvedQMgrName', '', '48s'],
+            ['RecsPresent', 0, MQLONG_TYPE],
+            ['PutMsgRecFields',  0, MQLONG_TYPE],
+            ['PutMsgRecOffset', 0, MQLONG_TYPE],
+            ['ResponseRecOffset', 0, MQLONG_TYPE],
+            ['PutMsgRecPtr', 0, 'P'],
+            ['ResponseRecPtr', 0, 'P']]
+
+        if "7.0" in pymqe.__mqlevels__:
+            opts += [
+                ['OriginalMsgHandle', 0L, 'q'],
+                ['NewMsgHandle', 0L, 'q'],
+                ['Action', 0L, MQLONG_TYPE],
+                ['PubLevel', 0L, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+# Backward compatibility
+PMO = pmo
+
+class od(MQOpts):
+    """od(**kw)
+
+    Construct a MQOD Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQOD_STRUC_ID, '4s'],
+            ['Version', CMQC.MQOD_VERSION_1, MQLONG_TYPE],
+            ['ObjectType', CMQC.MQOT_Q, MQLONG_TYPE],
+            ['ObjectName', '', '48s'],
+            ['ObjectQMgrName', '', '48s'],
+            ['DynamicQName', 'AMQ.*', '48s'],
+            ['AlternateUserId', '', '12s'],
+            ['RecsPresent', 0, MQLONG_TYPE],
+            ['KnownDestCount', 0, MQLONG_TYPE],
+            ['UnknownDestCount', 0, MQLONG_TYPE],
+            ['InvalidDestCount', 0, MQLONG_TYPE],
+            ['ObjectRecOffset', 0, MQLONG_TYPE],
+            ['ResponseRecOffset', 0, MQLONG_TYPE],
+            ['ObjectRecPtr', 0, 'P'],
+            ['ResponseRecPtr', 0, 'P'],
+            ['AlternateSecurityId', '', '40s'],
+            ['ResolvedQName', '', '48s'],
+            ['ResolvedQMgrName', '', '48s'],]
+
+        if "7.0" in pymqe.__mqlevels__:
+            opts += [
+
+                # ObjectString
+                ['ObjectStringVSPtr', 0, 'P'],
+                ['ObjectStringVSOffset', 0L, MQLONG_TYPE],
+                ['ObjectStringVSBufSize', 0L, MQLONG_TYPE],
+                ['ObjectStringVSLength', 0L, MQLONG_TYPE],
+                ['ObjectStringVSCCSID', 0L, MQLONG_TYPE],
+
+                # SelectionString
+                ['SelectionStringVSPtr', 0, 'P'],
+                ['SelectionStringVSOffset', 0L, MQLONG_TYPE],
+                ['SelectionStringVSBufSize', 0L, MQLONG_TYPE],
+                ['SelectionStringVSLength', 0L, MQLONG_TYPE],
+                ['SelectionStringVSCCSID', 0L, MQLONG_TYPE],
+
+                # ResObjectString
+                ['ResObjectStringVSPtr', 0, 'P'],
+                ['ResObjectStringVSOffset', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSBufSize', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSLength', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSCCSID', 0L, MQLONG_TYPE],
+
+                ['ResolvedType', -3L, MQLONG_TYPE]]
+
+            # For 64bit platforms MQLONG is an int and this pad
+            # needs to be here for WMQ 7.0
+            if MQLONG_TYPE == 'i':
+                opts += [['pad','', '4s']]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+# Backward compatibility
+OD = od
+
+class md(MQOpts):
+    """md(**kw)
+
+    Construct a MQMD Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        apply(MQOpts.__init__, (self, (
+            ['StrucId', CMQC.MQMD_STRUC_ID, '4s'],
+            ['Version', CMQC.MQMD_VERSION_1, MQLONG_TYPE],
+            ['Report', CMQC.MQRO_NONE, MQLONG_TYPE],
+            ['MsgType', CMQC.MQMT_DATAGRAM, MQLONG_TYPE],
+            ['Expiry', CMQC.MQEI_UNLIMITED, MQLONG_TYPE],
+            ['Feedback', CMQC.MQFB_NONE, MQLONG_TYPE],
+            ['Encoding', CMQC.MQENC_NATIVE, MQLONG_TYPE],
+            ['CodedCharSetId', CMQC.MQCCSI_Q_MGR, MQLONG_TYPE],
+            ['Format', '', '8s'],
+            ['Priority', CMQC.MQPRI_PRIORITY_AS_Q_DEF, MQLONG_TYPE],
+            ['Persistence', CMQC.MQPER_PERSISTENCE_AS_Q_DEF, MQLONG_TYPE],
+            ['MsgId', '', '24s'],
+            ['CorrelId', '', '24s'],
+            ['BackoutCount', 0, MQLONG_TYPE],
+            ['ReplyToQ', '', '48s'],
+            ['ReplyToQMgr', '', '48s'],
+            ['UserIdentifier', '', '12s'],
+            ['AccountingToken', '', '32s'],
+            ['ApplIdentityData', '', '32s'],
+            ['PutApplType', CMQC.MQAT_NO_CONTEXT, MQLONG_TYPE],
+            ['PutApplName', '', '28s'],
+            ['PutDate', '', '8s'],
+            ['PutTime', '', '8s'],
+            ['ApplOriginData', '', '4s'],
+            ['GroupId', '', '24s'],
+            ['MsgSeqNumber', 1, MQLONG_TYPE],
+            ['Offset', 0, MQLONG_TYPE],
+            ['MsgFlags', CMQC.MQMF_NONE, MQLONG_TYPE],
+            ['OriginalLength', CMQC.MQOL_UNDEFINED, MQLONG_TYPE])), kw)
+
+# Backward compatibility
+MD = md
+
+# RFH2 Header parsing/creation Support - Hannes Wagener - 2010.
+class RFH2(MQOpts):
+    """RFH2(**kw)
+
+    Construct a RFH2 Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'.  Attempt to parse the RFH2 when unpack is called.
+
+    """
+
+    initial_opts = [['StrucId', CMQC.MQRFH_STRUC_ID, '4s'],
+            ['Version', CMQC.MQRFH_VERSION_2, MQLONG_TYPE],
+            ['StrucLength', 0, MQLONG_TYPE],
+            ['Encoding', CMQC.MQENC_NATIVE, MQLONG_TYPE],
+            ['CodedCharSetId', CMQC.MQCCSI_Q_MGR, MQLONG_TYPE],
+            ['Format', CMQC.MQFMT_NONE, '8s'],
+            ['Flags', 0, MQLONG_TYPE],
+            ['NameValueCCSID', CMQC.MQCCSI_Q_MGR, MQLONG_TYPE]]
+
+    big_endian_encodings = [CMQC.MQENC_INTEGER_NORMAL,
+                            CMQC.MQENC_DECIMAL_NORMAL,
+                            CMQC.MQENC_FLOAT_IEEE_NORMAL,
+                            CMQC.MQENC_FLOAT_S390,
+                            #17
+                            CMQC.MQENC_INTEGER_NORMAL +
+                            CMQC.MQENC_DECIMAL_NORMAL,
+                            #257
+                            CMQC.MQENC_INTEGER_NORMAL +
+                            CMQC.MQENC_FLOAT_IEEE_NORMAL,
+                            #272
+                            CMQC.MQENC_DECIMAL_NORMAL +
+                            CMQC.MQENC_FLOAT_IEEE_NORMAL,
+                            #273
+                            CMQC.MQENC_INTEGER_NORMAL +
+                            CMQC.MQENC_DECIMAL_NORMAL +
+                            CMQC.MQENC_FLOAT_IEEE_NORMAL]
+
+    def __init__(self, **kw):
+        #take a copy of private initial_opts
+        self.opts = [list(x) for x in self.initial_opts]
+        apply(MQOpts.__init__, (self, tuple(self.opts)), kw)
+
+    def add_folder(self, folder_data):
+        """add_folder(folder_data)
+
+        Adds a new XML folder to the RFH2 header.
+        Checks if the XML is well formed and updates self.StrucLength.
+
+        """
+
+        folder_name = None
+        #check that the folder is valid xml and get the root tag name.
+        if use_minidom:
+            try:
+                folder_name = parseString(folder_data). \
+                                            documentElement.tagName
+            except Exception, e:
+                raise PYIFError("RFH2 - XML Folder not well formed. " \
+                                "Exception: %s" % str(e))
+        else:
+            try:
+                folder_name = lxml.etree.fromstring(folder_data).tag
+            except Exception, e:
+                raise PYIFError("RFH2 - XML Folder not well formed. " \
+                                "Exception: %s" % str(e))
+        #make sure folder length divides by 4 - else add spaces
+        folder_length = len(folder_data)
+        remainder = folder_length % 4
+        num_spaces = 0
+        if remainder != 0:
+            num_spaces = 4 - remainder
+            folder_data = folder_data + " " * num_spaces
+            folder_length = len(folder_data)
+
+        self.opts.append([folder_name + "Length", long(folder_length),
+                          MQLONG_TYPE])
+        self.opts.append([folder_name, folder_data, "%is" % folder_length])
+        #save the current values
+        saved_values = self.get()
+        #reinit MQOpts with new fields added
+        apply(MQOpts.__init__, (self, tuple(self.opts)), )
+        #reset the values to the saved values
+        self.set(**saved_values)
+        #calculate the correct StrucLength
+        self["StrucLength"] = self.get_length()
+
+    def pack(self, encoding=None):
+        """pack(encoding)
+
+        Override pack in order to set correct numeric encoding in the format.
+
+        """
+
+        if encoding is not None:
+            if encoding in self.big_endian_encodings:
+                self.opts[0][2] = ">" + self.initial_opts[0][2]
+                saved_values = self.get()
+                #apply the new opts
+                apply(MQOpts.__init__, (self, tuple(self.opts)), )
+                #set from saved values
+                self.set(**saved_values)
+
+        return MQOpts.pack(self)
+
+    def unpack(self, buff, encoding=None):
+        """unpack(buff, encoding)
+
+        Override unpack in order to extract and parse RFH2 folders.
+        Encoding meant to come from the MQMD.
+
+        """
+
+        if buff[0:4] != CMQC.MQRFH_STRUC_ID:
+            raise PYIFError("RFH2 - StrucId not MQRFH_STRUC_ID. Value: %s" %
+                            str(buff[0:4]))
+
+        if len(buff) < 36:
+            raise PYIFError("RFH2 - Buffer too short. Should be 36 bytes or " \
+                            "longer.  Buffer Length: %s" % str(len(buff)))
+        #take a copy of initial_opts and the lists inside
+        self.opts = [list(x) for x in self.initial_opts]
+
+        big_endian = False
+        if encoding is not None:
+            if encoding in self.big_endian_encodings:
+                big_endian = True
+        else:
+            #if small endian first byte of version should be > 'x\00'
+            if buff[4:5] == "\x00":
+                big_endian = True
+        #indicate bigendian in format
+        if big_endian:
+            self.opts[0][2] = ">" + self.opts[0][2]
+        #apply and parse the default header
+        apply(MQOpts.__init__, (self, tuple(self.opts)), )
+        MQOpts.unpack(self, buff[0:36])
+
+        if self['StrucLength'] < 0:
+            raise PYIFError("RFH2 - 'StrucLength' is negative. " \
+                            "Check numeric encoding.")
+
+        if len(buff) > 36:
+            if self['StrucLength'] > len(buff):
+                raise PYIFError("RFH2 - Buffer too short. Expected: " \
+                                "%s Buffer Length: %s" %
+                                (self['StrucLength'], len(buff)))
+
+        #extract only the string containing the xml folders and loop
+        s =  buff[36:self['StrucLength']]
+        while s:
+            #first 4 bytes is the folder length. supposed to divide by 4.
+            len_bytes = s[0:4]
+            folder_length = 0
+            if big_endian:
+                folder_length = struct.unpack(">l", len_bytes)[0]
+            else:
+                folder_length = struct.unpack("l", len_bytes)[0]
+
+            #move on past four byte length
+            s = s[4:]
+            #extract the folder string
+            folder_data = s[:folder_length]
+            #check that the folder is valid xml and get the root tag name
+            folder_name = None
+            #check that the folder is valid xml and get the root tag name.
+            if use_minidom:
+                try:
+                    folder_name = parseString(folder_data). \
+                                                documentElement.tagName
+                except Exception, e:
+                    raise PYIFError("RFH2 - XML Folder not well formed. " \
+                                    "Exception: %s" % str(e))
+            else:
+                try:
+                    folder_name = lxml.etree.fromstring(folder_data).tag
+                except Exception, e:
+                    raise PYIFError("RFH2 - XML Folder not well formed. " \
+                                    "Exception: %s" % str(e))
+            #append folder length and folder string to self.opts types
+            self.opts.append([folder_name + "Length", long(folder_length),
+                              MQLONG_TYPE])
+            self.opts.append([folder_name, folder_data, "%is" %
+                              folder_length])
+            #move on past the folder
+            s = s[folder_length:]
+
+        #save the current values
+        saved_values = self.get()
+        #apply the new opts
+        apply(MQOpts.__init__, (self, tuple(self.opts)), )
+        #set from saved values
+        self.set(**saved_values)
+        #unpack the buffer? - should get same result?
+        #MQOpts.unpack(self, buff[0:self["StrucLength"]])
+
+class TM(MQOpts):
+    """TM(**kw)
+
+    Construct a MQTM Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments 'kw'.
+
+    """
+
+    def __init__(self, **kw):
+        apply(MQOpts.__init__, (self, (
+            ['StrucId', CMQC.MQTM_STRUC_ID, '4s'],
+            ['Version', CMQC.MQTM_VERSION_1, MQLONG_TYPE],
+            ['QName', '', '48s'],
+            ['ProcessName', '', '48s'],
+            ['TriggerData', '', '64s'],
+            ['ApplType', 0, MQLONG_TYPE],
+            ['ApplId', '', '256s'],
+            ['EnvData', '', '128s'],
+            ['UserData', '', '128s'])), kw)
+
+
+class TMC2(MQOpts):
+    """TMC2(**kw)
+
+    Construct a MQTMC2 Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments 'kw'.
+
+    """
+
+    def __init__(self, **kw):
+        apply(MQOpts.__init__, (self, (
+            ['StrucId', CMQC.MQTMC_STRUC_ID, '4s'],
+            ['Version', CMQC.MQTMC_VERSION_2, '4s'],
+            ['QName', '', '48s'],
+            ['ProcessName', '', '48s'],
+            ['TriggerData', '', '64s'],
+            ['ApplType', '', '4s'],
+            ['ApplId', '', '256s'],
+            ['EnvData', '', '128s'],
+            ['UserData', '', '128s'],
+            ['QMgrName', '', '48s'])), kw)
+
+# MQCONNX code courtesy of John OSullivan (mailto:jos@onebox.com)
+# SSL additions courtesy of Brian Vicente (mailto:sailbv@netscape.net)
+
+class cd(MQOpts):
+    """cd(**kw)
+
+    Construct a MQCD Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    # The MQCD_VERSION & MQCD_LENGTH_* we're going to use depend on the WMQ
+    # version we had been compiled with but it is not known on Python side
+    # until runtime so set it once here when first importing pymqi
+    # (originally written by Brent S. Elmer, Ph.D. (mailto:webe3vt@aim.com)).
+
+    if '7.5' in pymqe.__mqlevels__:
+        _mqcd_version = CMQXC.MQCD_VERSION_10
+        _mqcd_current_length = CMQXC.MQCD_LENGTH_10
+
+    elif '7.0' in pymqe.__mqlevels__:
+        _mqcd_version = CMQXC.MQCD_VERSION_9
+        _mqcd_current_length = CMQXC.MQCD_LENGTH_9
+
+    elif '6.0' in pymqe.__mqlevels__:
+        _mqcd_version = CMQXC.MQCD_VERSION_8
+        _mqcd_current_length = CMQXC.MQCD_LENGTH_8
+
+    elif '5.3' in pymqe.__mqlevels__:
+        _mqcd_version = CMQXC.MQCD_VERSION_7
+        _mqcd_current_length = CMQXC.MQCD_LENGTH_7
+
+    else:
+        # The default version in MQCD_DEFAULT in cmqxc.h is MQCD_VERSION_6
+        _mqcd_version = CMQXC.MQCD_VERSION_6
+        _mqcd_current_length = CMQXC.MQCD_LENGTH_6
+
+    def __init__(self, **kw):
+        opts = []
+        opts += [
+            ['ChannelName', '', '20s'],
+            ['Version', self._mqcd_version, MQLONG_TYPE],
+            ['ChannelType', CMQC.MQCHT_SENDER, MQLONG_TYPE],
+            ['TransportType', CMQC.MQXPT_LU62, MQLONG_TYPE],
+            ['Desc', '', '64s'],
+            ['QMgrName', '', '48s'],
+            ['XmitQName', '', '48s'],
+            ['ShortConnectionName', '', '20s'],
+            ['MCAName', '', '20s'],
+            ['ModeName', '', '8s'],
+            ['TpName', '', '64s'],
+            ['BatchSize', 50L, MQLONG_TYPE],
+            ['DiscInterval', 6000L, MQLONG_TYPE],
+            ['ShortRetryCount', 10L, MQLONG_TYPE],
+            ['ShortRetryInterval', 60L, MQLONG_TYPE],
+            ['LongRetryCount', 999999999L, MQLONG_TYPE],
+            ['LongRetryInterval', 1200L, MQLONG_TYPE],
+            ['SecurityExit', '', '128s'],
+            ['MsgExit', '', '128s'],
+            ['SendExit', '', '128s'],
+            ['ReceiveExit', '', '128s'],
+            ['SeqNumberWrap', 999999999L, MQLONG_TYPE],
+            ['MaxMsgLength', 4194304L, MQLONG_TYPE],
+            ['PutAuthority', CMQC.MQPA_DEFAULT, MQLONG_TYPE],
+            ['DataConversion', CMQC.MQCDC_NO_SENDER_CONVERSION, MQLONG_TYPE],
+            ['SecurityUserData', '', '32s'],
+            ['MsgUserData', '', '32s'],
+            ['SendUserData', '', '32s'],
+            ['ReceiveUserData', '', '32s'],
+            ['UserIdentifier', '', '12s'],
+            ['Password', '', '12s'],
+            ['MCAUserIdentifier', '', '12s'],
+            ['MCAType', CMQC.MQMCAT_PROCESS, MQLONG_TYPE],
+            ['ConnectionName', '', '264s'],
+            ['RemoteUserIdentifier', '', '12s'],
+            ['RemotePassword', '', '12s'],
+            ['MsgRetryExit', '', '128s'],
+            ['MsgRetryUserData', '', '32s'],
+            ['MsgRetryCount', 10L, MQLONG_TYPE],
+            ['MsgRetryInterval', 1000L, MQLONG_TYPE],
+            ['HeartbeatInterval', 300L, MQLONG_TYPE],
+            ['BatchInterval', 0L, MQLONG_TYPE],
+            ['NonPersistentMsgSpeed', CMQC.MQNPMS_FAST, MQLONG_TYPE],
+            ['StrucLength', self._mqcd_current_length, MQLONG_TYPE],
+            ['ExitNameLength', CMQC.MQ_EXIT_NAME_LENGTH, MQLONG_TYPE],
+            ['ExitDataLength', CMQC.MQ_EXIT_DATA_LENGTH, MQLONG_TYPE],
+            ['MsgExitsDefined', 0L, MQLONG_TYPE],
+            ['SendExitsDefined', 0L, MQLONG_TYPE],
+            ['ReceiveExitsDefined', 0L, MQLONG_TYPE],
+            ['MsgExitPtr', 0, 'P'],
+            ['MsgUserDataPtr', 0, 'P'],
+            ['SendExitPtr', 0, 'P'],
+            ['SendUserDataPtr', 0, 'P'],
+            ['ReceiveExitPtr', 0, 'P'],
+            ['ReceiveUserDataPtr', 0, 'P'],
+            ['ClusterPtr', 0, 'P'],
+            ['ClustersDefined', 0L, MQLONG_TYPE],
+            ['NetworkPriority', 0L, MQLONG_TYPE],
+            ['LongMCAUserIdLength', 0L, MQLONG_TYPE],
+            ['LongRemoteUserIdLength', 0L, MQLONG_TYPE],
+            ['LongMCAUserIdPtr', 0, 'P'],
+            ['LongRemoteUserIdPtr', 0, 'P'],
+            ['MCASecurityId', '', '40s'],
+            ['RemoteSecurityId', '', '40s']]
+
+        # If SSL is supported, append the options. SSL support is
+        # implied by 5.3.
+        if "5.3" in pymqe.__mqlevels__:
+            opts += [['SSLCipherSpec','','32s'],
+                     ['SSLPeerNamePtr',0,'P'],
+                     ['SSLPeerNameLength',0L,MQLONG_TYPE],
+                     ['SSLClientAuth',0L,MQLONG_TYPE],
+                     ['KeepAliveInterval',-1,MQLONG_TYPE],
+                     ['LocalAddress','','48s'],
+                     ['BatchHeartbeat',0L,MQLONG_TYPE]]
+        else:
+            # No mqaiExecute means no 5.3, so redefine the struct version
+            opts[1] = ['Version', CMQC.MQCD_VERSION_6, MQLONG_TYPE]
+
+        if "6.0" in pymqe.__mqlevels__:
+            opts += [['HdrCompList', [0L, -1L], '2' + MQLONG_TYPE],
+                     ['MsgCompList', [0] + 15 * [-1L], '16' + MQLONG_TYPE],
+                     ['CLWLChannelRank', 0L, MQLONG_TYPE],
+                     ['CLWLChannelPriority', 0L, MQLONG_TYPE],
+                     ['CLWLChannelWeight', 50L, MQLONG_TYPE],
+                     ['ChannelMonitoring', 0L, MQLONG_TYPE],
+                     ['ChannelStatistics', 0L, MQLONG_TYPE]]
+
+        if "7.0" in pymqe.__mqlevels__:
+            opts += [['SharingConversations', 10, MQLONG_TYPE],
+                     ['PropertyControl', 0, MQLONG_TYPE],      # 0 = MQPROP_COMPATIBILITY
+                     ['MaxInstances', 999999999, MQLONG_TYPE],
+                     ['MaxInstancesPerClient', 999999999, MQLONG_TYPE],
+                     ['ClientChannelWeight', 0, MQLONG_TYPE],
+                     ['ConnectionAffinity', 1, MQLONG_TYPE]]  # 1 = MQCAFTY_PREFERRED
+            
+        if '7.5' in pymqe.__mqlevels__:
+            opts += [['BatchDataLimit', 5000, MQLONG_TYPE],
+                     ['UseDLQ', 2, MQLONG_TYPE],
+                     ['DefReconnect', 0, MQLONG_TYPE]]
+
+        # In theory, the pad should've been placed right before the 'MsgExitPtr'
+        # attribute, however setting it there makes no effect and that's why
+        # it's being set here, as a last element in the list.
+        if '7.5' not in pymqe.__mqlevels__:
+            if MQLONG_TYPE == 'i':
+                opts += [['pad','', '4s']]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+# Backward compatibility
+CD = cd
+
+# SCO Class for SSL Support courtesy of Brian Vicente (mailto:sailbv@netscape.net)
+class sco(MQOpts):
+    """sco(**kw)
+
+    Construct a MQSCO Structure with default values as per MQI. The
+    default values maybe overridden by the optional keyword arguments
+    'kw'. """
+
+    def __init__(self, **kw):
+        opts = [
+            ['StrucId', CMQC.MQSCO_STRUC_ID, '4s'],
+            ['Version', CMQC.MQSCO_VERSION_1, MQLONG_TYPE],
+            ['KeyRepository', '', '256s'],
+            ['CryptoHardware', '', '256s'],
+            ['AuthInfoRecCount', 0L, MQLONG_TYPE],
+            ['AuthInfoRecOffset', 0L, MQLONG_TYPE],
+            ['AuthInfoRecPtr', 0, 'P']]
+
+        # Add new SSL fields defined in 6.0 and update version to 2
+        if "6.0" in pymqe.__mqlevels__:
+            opts += [['KeyResetCount', 0L, MQLONG_TYPE],
+                     ['FipsRequired', 0L, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+# Backward compatibility
+SCO = sco
+
+class SD(MQOpts):
+    """SD(**kw)
+
+    Construct a MQSD Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQSD_STRUC_ID, '4s'],
+                ['Version', CMQC.MQSD_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQSO_NON_DURABLE, MQLONG_TYPE],
+                ['ObjectName', '', '48s'],
+                ['AlternateUserId', '', '12s'],
+                ['AlternateSecurityId', CMQC.MQSID_NONE, '40s'],
+                ['SubExpiry', CMQC.MQEI_UNLIMITED, MQLONG_TYPE],
+
+                # ObjectString
+                ['ObjectStringVSPtr', 0, 'P'],
+                ['ObjectStringVSOffset', 0L, MQLONG_TYPE],
+                ['ObjectStringVSBufSize', 0L, MQLONG_TYPE],
+                ['ObjectStringVSLength', 0L, MQLONG_TYPE],
+                ['ObjectStringVSCCSID', 0L, MQLONG_TYPE],
+
+                #Subname
+                ['SubNameVSPtr', 0, 'P'],
+                ['SubNameVSOffset', 0L, MQLONG_TYPE],
+                ['SubNameVSBufSize', 0L, MQLONG_TYPE],
+                ['SubNameVSLength', 0L, MQLONG_TYPE],
+                ['SubNameVSCCSID', 0L, MQLONG_TYPE],
+
+                #SubUserData
+                ['SubUserDataVSPtr', 0, 'P'],
+                ['SubUserDataVSOffset', 0L, MQLONG_TYPE],
+                ['SubUserDataVSBufSize', 0L, MQLONG_TYPE],
+                ['SubUserDataVSLength', 0L, MQLONG_TYPE],
+                ['SubUserDataVSCCSID', 0L, MQLONG_TYPE],
+
+                ['SubCorrelId', CMQC.MQCI_NONE, '24s'],
+                ['PubPriority', CMQC.MQPRI_PRIORITY_AS_Q_DEF, MQLONG_TYPE],
+                ['PubAccountingToken', CMQC.MQACT_NONE, '32s'],
+                ['PubApplIdentityData', '', '32s'],
+
+                #SelectionString
+                ['SelectionStringVSPtr', 0, 'P'],
+                ['SelectionStringVSOffset', 0L, MQLONG_TYPE],
+                ['SelectionStringVSBufSize', 0L, MQLONG_TYPE],
+                ['SelectionStringVSLength', 0L, MQLONG_TYPE],
+                ['SelectionStringVSCCSID', 0L, MQLONG_TYPE],
+
+                ['SubLevel', 0, MQLONG_TYPE],
+
+                 #SelectionString
+                ['ResObjectStringVSPtr', 0, 'P'],
+                ['ResObjectStringVSOffset', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSBufSize', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSLength', 0L, MQLONG_TYPE],
+                ['ResObjectStringVSCCSID', 0L, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+
+class SRO(MQOpts):
+    """SRO(**kw)
+
+    Construct a MQSRO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQSRO_STRUC_ID, '4s'],
+                ['Version', CMQC.MQSRO_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQSRO_FAIL_IF_QUIESCING, MQLONG_TYPE],
+                ['NumPubs', 0, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+class CMHO(MQOpts):
+    """CMHO(**kw)
+
+    Construct an MQCMHO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQCMHO_STRUC_ID, '4s'],
+                ['Version', CMQC.MQCMHO_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQCMHO_DEFAULT_VALIDATION, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+class PD(MQOpts):
+    """CMHO(**kw)
+
+    Construct an MQPD Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQPD_STRUC_ID, '4s'],
+                ['Version', CMQC.MQPD_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQPD_NONE, MQLONG_TYPE],
+                ['Support', CMQC.MQPD_SUPPORT_OPTIONAL, MQLONG_TYPE],
+                ['Context', CMQC.MQPD_NO_CONTEXT, MQLONG_TYPE],
+                ['CopyOptions', CMQC.MQCOPY_DEFAULT, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+class SMPO(MQOpts):
+    """SMPO(**kw)
+
+    Construct an MQSMPO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQSMPO_STRUC_ID, '4s'],
+                ['Version', CMQC.MQSMPO_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQSMPO_SET_FIRST, MQLONG_TYPE],
+                ['ValueEncoding', CMQC.MQENC_NATIVE, MQLONG_TYPE],
+                ['ValueCCSID', CMQC.MQCCSI_APPL, MQLONG_TYPE]]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+class IMPO(MQOpts):
+    """IMPO(**kw)
+
+    Construct an MQIMPO Structure with default values as per MQI. The
+    default values may be overridden by the optional keyword arguments
+    'kw'."""
+    def __init__(self, **kw):
+        opts = [['StrucId', CMQC.MQIMPO_STRUC_ID, '4s'],
+                ['Version', CMQC.MQIMPO_VERSION_1, MQLONG_TYPE],
+                ['Options', CMQC.MQIMPO_INQ_FIRST, MQLONG_TYPE],
+                ['RequestedEncoding', CMQC.MQENC_NATIVE, MQLONG_TYPE],
+                ['RequestedCCSID', CMQC.MQCCSI_APPL, MQLONG_TYPE],
+                ['ReturnedEncoding', CMQC.MQENC_NATIVE, MQLONG_TYPE],
+                ['ReturnedCCSID', 0L, MQLONG_TYPE],
+                ['Reserved1', 0L, MQLONG_TYPE],
+
+                # ReturnedName
+                ['ReturnedNameVSPtr', 0, 'P'],
+                ['ReturnedNameVSOffset', 0L, MQLONG_TYPE],
+                ['ReturnedNameVSBufSize', 0L, MQLONG_TYPE],
+                ['ReturnedNameVSLength', 0L, MQLONG_TYPE],
+                ['ReturnedNameVSCCSID', 0L, MQLONG_TYPE],
+
+                ['TypeString', '', '8s']]
+
+        apply(MQOpts.__init__, (self, tuple(opts)), kw)
+
+#
+# A utility to convert a MQ constant to its string mnemonic by groping
+# a module dictonary
+#
+
+class _MQConst2String:
+
+    def __init__(self, module, prefix):
+        self.__module = module;
+        self.__prefix = prefix
+        self.__stringDict = {}
+        self.__lock = threading.Lock()
+
+    def __build(self):
+        # Lazily build the dictionary of consts vs. their
+        # mnemonic strings from the given module dict. Only those
+        # attribute that begins with the prefix are considered.
+        self.__lock.acquire()
+        if len(self.__stringDict) == 0:
+            pfxlen = len(self.__prefix)
+            for i in self.__module.__dict__.keys():
+                if i[0:pfxlen] == self.__prefix:
+                    newKey, newVal = self.__module.__dict__[i], i
+                    self.__stringDict[newKey] = newVal
+        self.__lock.release()
+
+    def __getitem__(self, code):
+        self.__build()
+        return self.__stringDict[code]
+
+    def has_key(self, key):
+        self.__build()
+        return self.__stringDict.has_key(key)
+
+
+#######################################################################
+#
+# Exception class that encapsulates MQI completion/reason codes.
+#
+#######################################################################
+
+class Error(exceptions.Exception):
+    """Base class for all pymqi exceptions."""
+    pass
+
+class MQMIError(Error):
+    """Exception class for MQI low level errors."""
+    errStringDicts = (_MQConst2String(CMQC, "MQRC_"), _MQConst2String(CMQCFC, "MQRCCF_"),)
+
+    def __init__(self, comp, reason):
+        """MQMIError(comp, reason)
+
+        Construct the error object with MQI completion code 'comp' and
+        reason code 'reason'."""
+
+        self.comp, self.reason = comp, reason
+
+    def __str__(self):
+        """__str__()
+
+        Pretty print the exception object."""
+
+        return 'MQI Error. Comp: %d, Reason %d: %s' % (self.comp, self.reason, self.errorAsString())
+
+    def errorAsString(self):
+        """errorAsString()
+
+        Return the exception object MQI warning/failed reason as its
+        mnemonic string."""
+
+        if self.comp == CMQC.MQCC_OK:
+            return 'OK'
+        elif self.comp == CMQC.MQCC_WARNING:
+            pfx = 'WARNING: '
+        else:
+            pfx = 'FAILED: '
+
+        for d in MQMIError.errStringDicts:
+            if d.has_key(self.reason):
+                return pfx + d[self.reason]
+        return pfx + 'WTF? Error code ' + str(self.reason) + ' not defined'
+
+class PYIFError(Error):
+    """Exception class for errors generated by pymqi."""
+    def __init__(self, e):
+        """PYIFError(e)
+
+        Construct the error object with error string 'e'."""
+        self.error = e
+
+    def __str__(self):
+        """__str__
+
+        Pretty print the exception object."""
+        return 'PYMQI Error: ' + str(self.error)
+
+
+#######################################################################
+#
+# MQI Verbs
+#
+#######################################################################
+
+class QueueManager:
+    """QueueManager encapsulates the connection to the Queue Manager. By
+    default, the Queue Manager is implicitly connected. If required,
+    the connection may be deferred until a call to connect().
+    """
+
+    def __init__(self, name = ''):
+        """QueueManager(name = '')
+
+        Connect to the Queue Manager 'name' (default value ''). If
+        'name' is None, don't connect now, but defer the connection
+        until connect() is called."""
+
+        self.__handle = None
+        self.__name = name
+        self.__qmobj = None
+        if name != None:
+            self.connect(name)
+
+    def __del__(self):
+        """__del__()
+
+        Disconnect the Queue Manager, if connected."""
+
+        if self.__handle:
+            if self.__qmobj:
+                try:
+                    pymqe.MQCLOSE(self.__handle, self.__qmobj)
+                except:
+                    pass
+            try:
+                self.disconnect()
+            except:
+                pass
+
+    def connect(self, name):
+        """connect(name)
+
+        Connect immediately to the Queue Manager 'name'."""
+
+        rv = pymqe.MQCONN(name)
+        if rv[1]:
+            raise MQMIError(rv[1], rv[2])
+        self.__handle = rv[0]
+        self.__name = name
+
+
+# MQCONNX code courtesy of John OSullivan (mailto:jos@onebox.com)
+# SSL additions courtesy of Brian Vicente (mailto:sailbv@netscape.net)
+# Connect options suggested by Jaco Smuts (mailto:JSmuts@clover.co.za)
+
+    def connectWithOptions(self, name, *bwopts, **kw):
+        """connectWithOptions(name [, opts=cnoopts][ ,cd=mqcd][ ,sco=mqsco])
+           connectWithOptions(name, cd, [sco])
+
+        Connect immediately to the Queue Manager 'name', using the
+        optional MQCNO Options opts, the optional MQCD connection
+        descriptor cd and the optional MQSCO SSL options sco.
+
+        The second form is defined for backward compatibility with
+        older (broken) versions of pymqi. It connects immediately to
+        the Queue Manager 'name', using the MQCD connection descriptor
+        cd and the optional MQSCO SSL options sco."""
+
+        # Deal with old style args
+        bwoptsLen = len(bwopts)
+        if bwoptsLen:
+            if bwoptsLen > 2:
+                raise exceptions.TypeError('Invalid options: %s' % bwopts)
+            if bwoptsLen >= 1:
+                kw['cd'] = bwopts[0]
+            if bwoptsLen == 2:
+                kw['sco'] = bwopts[1]
+
+        else:
+            # New style args
+            for k in kw.keys():
+                if k not in ('opts', 'cd', 'sco'):
+                    raise exceptions.TypeError('Invalid option: %s' % k)
+
+        options = CMQC.MQCNO_NONE
+        ocd = cd()
+        if kw.has_key('opts'):
+            options = kw['opts']
+        if kw.has_key('cd'):
+            ocd = kw['cd']
+        if kw.has_key('sco'):
+            rv = pymqe.MQCONNX(name, options, ocd.pack(), kw['sco'].pack())
+        else:
+            rv = pymqe.MQCONNX(name, options, ocd.pack())
+        if rv[1]:
+            raise MQMIError(rv[1], rv[2])
+        self.__handle = rv[0]
+        self.__name = name
+
+    # Backward compatibility
+    connect_with_options = connectWithOptions
+
+    def connectTCPClient(self, name, cd, channelName, connectString):
+        """connectTCPClient(name, cd, channelName, connectString)
+
+        Connect immediately to the remote Queue Manager 'name', using
+        a TCP Client connection, with channnel 'channelName' and the
+        TCP connection string 'connectString'. All other connection
+        optons come from 'cd'."""
+
+        cd.ChannelName = channelName
+        cd.ConnectionName = connectString
+        cd.ChannelType = CMQC.MQCHT_CLNTCONN
+        cd.TransportType = CMQC.MQXPT_TCP
+        self.connectWithOptions(name, cd)
+
+    # Backward compatibility
+    connect_tcp_client = connectTCPClient
+
+    def disconnect(self):
+        """disconnect()
+
+        Disconnect from queue manager, if connected."""
+
+        if self.__handle:
+            rv = pymqe.MQDISC(self.__handle)
+        else:
+            raise PYIFError('not connected')
+
+    def getHandle(self):
+        """getHandle()
+
+        Get the queue manager handle. The handle is used for other
+        pymqi calls."""
+
+        if self.__handle:
+            return self.__handle
+        else:
+            raise PYIFError('not connected')
+
+    # Backward compatibility
+    get_handle = getHandle
+
+    def begin(self):
+        """begin()
+
+        Begin a new global transaction.
+        """
+
+        rv = pymqe.MQBEGIN(self.__handle)
+        if rv[0]:
+            raise MQMIError(rv[0], rv[1])
+
+    def commit(self):
+        """commit()
+
+        Commits any outstanding gets/puts in the current unit of work."""
+
+        rv = pymqe.MQCMIT(self.__handle)
+        if rv[0]:
+            raise MQMIError(rv[0], rv[1])
+
+    def backout(self):
+        """backout()
+
+        Backout any outstanding gets/puts in the current unit of
+        work."""
+
+        rv = pymqe.MQBACK(self.__handle)
+        if rv[0]:
+            raise MQMIError(rv[0], rv[1])
+
+    def put1(self, qDesc, msg, *opts):
+        """put1(qDesc, msg [, mDesc, putOpts])
+
+        Put the single message in string buffer 'msg' on the queue
+        using the MQI PUT1 call. This encapsulates calls to MQOPEN,
+        MQPUT and MQCLOSE. put1 is the optimal way to put a single
+        message on a queue.
+
+        qDesc identifies the Queue either by name (if its a string),
+        or by MQOD (if its a pymqi.od() instance).
+
+        mDesc is the pymqi.md() MQMD Message Descriptor for the
+        message. If it is not passed, or is None, then a default md()
+        object is used.
+
+        putOpts is the pymqi.pmo() MQPMO Put Message Options structure
+        for the put1 call. If it is not passed, or is None, then a
+        default pmo() object is used.
+
+        If mDesc and/or putOpts arguments were supplied, they may be
+        updated by the put1 operation."""
+
+        mDesc, putOpts = apply(commonQArgs, opts)
+        if putOpts == None:
+            putOpts = pmo()
+
+        # Now send the message
+        rv = pymqe.MQPUT1(self.__handle, makeQDesc(qDesc).pack(),
+                          mDesc.pack(), putOpts.pack(), msg)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+        mDesc.unpack(rv[0])
+        putOpts.unpack(rv[1])
+
+
+    def inquire(self, attribute):
+        """inquire(attribute)
+
+        Inquire on queue manager 'attribute'. Returns either the
+        integer or string value for the attribute."""
+
+        if self.__qmobj == None:
+            # Make an od for the queue manager, open the qmgr & cache result
+            qmod = od(ObjectType = CMQC.MQOT_Q_MGR, ObjectQMgrName = self.__name)
+            rv = pymqe.MQOPEN(self.__handle, qmod.pack(), CMQC.MQOO_INQUIRE)
+            if rv[-2]:
+                raise MQMIError(rv[-2], rv[-1])
+            self.__qmobj = rv[0]
+        rv = pymqe.MQINQ(self.__handle, self.__qmobj, attribute)
+        if rv[1]:
+            raise MQMIError(rv[-2], rv[-1])
+        return rv[0]
+
+    def _is_connected(self):
+        """ Try pinging the queue manager in order to see whether the application
+        is connected to it. Note that the method is merely a convienece wrapper
+        around MQCMD_PING_Q_MGR, in particular, there's still possibility that
+        the app will disconnect between checking QueueManager.is_connected
+        and the next MQ call.
+        """
+        pcf = PCFExecute(self)
+        try:
+            pcf.MQCMD_PING_Q_MGR()
+        except Exception, e:
+            return False
+        else:
+            return True
+
+    is_connected = property(_is_connected)
+
+
+# Some support functions for Queue ops.
+def makeQDesc(qDescOrString):
+    "Maybe make MQOD from string. Module Private"
+    if type(qDescOrString) is types.StringType:
+        return od(ObjectName = qDescOrString)
+    else:
+        return qDescOrString
+
+make_q_desc = makeQDesc
+
+def commonQArgs(*opts):
+    "Process args common to put/get/put1. Module Private."
+    l = len(opts)
+    if l > 2:
+        raise exceptions.TypeError, 'Too many args'
+    mDesc = None
+    pgOpts = None
+    if l > 0:
+        mDesc = opts[0]
+    if l == 2:
+        pgOpts = opts[1]
+    if mDesc == None:
+        mDesc = md()
+    return(mDesc, pgOpts)
+
+common_q_args = commonQArgs
+
+
+class Queue:
+
+    """Queue encapsulates all the Queue I/O operations, including
+    open/close and get/put. A QueueManager object must be already
+    connected. The Queue may be opened implicitly on construction, or
+    the open may be deferred until a call to open(), put() or
+    get(). The Queue to open is identified either by a queue name
+    string (in which case a default MQOD structure is created using
+    that name), or by passing a ready constructed MQOD class."""
+
+
+    def __realOpen(self):
+        "Really open the queue."
+        if self.__qDesc == None:
+            raise PYIFError, 'The Queue Descriptor has not been set.'
+        rv = pymqe.MQOPEN(self.__qMgr.getHandle(),
+                          self.__qDesc.pack(), self.__openOpts)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+        self.__qHandle = rv[0]
+        self.__qDesc.unpack(rv[1])
+
+    def __init__(self, qMgr, *opts):
+        """Queue(qMgr, [qDesc [,openOpts]])
+
+        Associate a Queue instance with the QueueManager object 'qMgr'
+        and optionally open the Queue.
+
+        If qDesc is passed, it identifies the Queue either by name (if
+        its a string), or by MQOD (if its a pymqi.od() instance). If
+        qDesc is not defined, then the Queue is not opened
+        immediately, but deferred to a subsequent call to open().
+
+        If openOpts is passed, it specifies queue open options, and
+        the queue is opened immediately. If openOpts is not passed,
+        the queue open is deferred to a subsequent call to open(),
+        put() or get().
+
+        The following table clarifies when the Queue is opened:
+
+           qDesc  openOpts   When opened
+             N       N       open()
+             Y       N       open() or get() or put()
+             Y       Y       Immediately
+        """
+
+        self.__qMgr = qMgr
+        self.__qHandle = self.__qDesc = self.__openOpts = None
+        l = len(opts)
+        if l > 2:
+            raise exceptions.TypeError, 'Too many args'
+        if l > 0:
+            self.__qDesc = makeQDesc(opts[0])
+        if l == 2:
+            self.__openOpts = opts[1]
+            self.__realOpen()
+
+    def __del__(self):
+        """__del__()
+
+        Close the Queue, if it has been opened."""
+
+        if self.__qHandle:
+            try:
+                self.close()
+            except:
+                pass
+
+    def open(self, qDesc, *opts):
+        """open(qDesc [,openOpts])
+
+        Open the Queue specified by qDesc. qDesc identifies the Queue
+        either by name (if its a string), or by MQOD (if its a
+        pymqi.od() instance). If openOpts is passed, it defines the
+        Queue open options, and the Queue is opened immediately. If
+        openOpts is not passed, the Queue open is deferred until a
+        subsequent put() or get() call."""
+
+        l = len(opts)
+        if l > 1:
+            raise exceptions.TypeError, 'Too many args'
+        if self.__qHandle:
+            raise PYIFError('The Queue is already open')
+        self.__qDesc = makeQDesc(qDesc)
+        if l == 1:
+            self.__openOpts = opts[0]
+            self.__realOpen()
+
+
+    def put(self, msg, *opts):
+        """put(msg[, mDesc ,putOpts])
+
+        Put the string buffer 'msg' on the queue. If the queue is not
+        already open, it is opened now with the option 'MQOO_OUTPUT'.
+
+        mDesc is the pymqi.md() MQMD Message Descriptor for the
+        message. If it is not passed, or is None, then a default md()
+        object is used.
+
+        putOpts is the pymqi.pmo() MQPMO Put Message Options structure
+        for the put call. If it is not passed, or is None, then a
+        default pmo() object is used.
+
+        If mDesc and/or putOpts arguments were supplied, they may be
+        updated by the put operation."""
+
+        mDesc, putOpts = apply(commonQArgs, opts)
+        if putOpts == None:
+            putOpts = pmo()
+        # If queue open was deferred, open it for put now
+        if not self.__qHandle:
+            self.__openOpts = CMQC.MQOO_OUTPUT
+            self.__realOpen()
+        # Now send the message
+        rv = pymqe.MQPUT(self.__qMgr.getHandle(), self.__qHandle, mDesc.pack(),
+                         putOpts.pack(), msg)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+        mDesc.unpack(rv[0])
+        putOpts.unpack(rv[1])
+
+    def put_rfh2(self, msg, *opts):
+        """put_rfh2(msg[, mDesc ,putOpts, [rfh2_header, ]])
+
+        Put a RFH2 message. opts[2] is a list of RFH2 headers.
+        MQMD and RFH2's must be correct.
+
+        """
+
+        rfh2_buff = ""
+        if len(opts) >= 3:
+            if opts[2] is not None:
+                if not isinstance(opts[2], list):
+                    raise exceptions.TypeError("Third item of opts should " \
+                                               "be a list.")
+                encoding = CMQC.MQENC_NATIVE
+                if opts[0] is not None:
+                    mqmd = opts[0]
+                    encoding = mqmd["Encoding"]
+
+                for rfh2_header in opts[2]:
+                    if rfh2_header is not None:
+                        rfh2_buff = rfh2_buff + rfh2_header.pack(encoding)
+                        encoding = rfh2_header["Encoding"]
+
+                msg = rfh2_buff + msg
+            self.put(msg, *opts[0:2])
+        else:
+            self.put(msg, *opts)
+
+    def get(self, maxLength = None, *opts):
+        """get([maxLength [, mDesc, getOpts]])
+
+        Return a message from the queue. If the queue is not already
+        open, it is opened now with the option 'MQOO_INPUT_AS_Q_DEF'.
+
+        maxLength, if present, specifies the maximum length for the
+        message. If the message received exceeds maxLength, then the
+        behavior is as defined by MQI and the getOpts argument.
+
+        If maxLength is not specified, or is None, then the entire
+        message is returned regardless of its size. This may require
+        multiple calls to the underlying MQGET API.
+
+        mDesc is the pymqi.md() MQMD Message Descriptor for receiving
+        the message. If it is not passed, or is None, then a default
+        md() object is used.
+
+        getOpts is the pymqi.gmo() MQGMO Get Message Options
+        structure for the get call. If it is not passed, or is None,
+        then a default gmo() object is used.
+
+        If mDesc and/or getOpts arguments were supplied, they may be
+        updated by the get operation."""
+
+        mDesc, getOpts = apply(commonQArgs, opts)
+        if getOpts == None:
+            getOpts = gmo()
+        # If queue open was deferred, open it for put now
+        if not self.__qHandle:
+            self.__openOpts = CMQC.MQOO_INPUT_AS_Q_DEF
+            self.__realOpen()
+
+        # Truncated message fix thanks to Maas-Maarten Zeeman
+        if maxLength == None:
+            length = 4096
+        else:
+            length = maxLength
+
+        rv = pymqe.MQGET(self.__qMgr.getHandle(), self.__qHandle,
+                        mDesc.pack(), getOpts.pack(), length)
+
+        if not rv[-2]:
+            # Everything A OK
+            mDesc.unpack(rv[1])
+            getOpts.unpack(rv[2])
+            return rv[0]
+
+        # Some error. If caller supplied buffer, maybe it wasn't big
+        # enough, so just return the error/warning.
+        # CAVEAT: If message truncated, this exception loses the
+        # partially filled buffer.
+        if maxLength != None and maxLength >= 0:
+            raise MQMIError(rv[-2], rv[-1])
+
+        # Default buffer used, if not truncated, give up
+        if rv[-1] != CMQC.MQRC_TRUNCATED_MSG_FAILED:
+            raise MQMIError(rv[-2], rv[-1])
+
+        # Message truncated, but we know its size. Do another MQGET
+        # to retrieve it from the queue.
+        mDesc.unpack(rv[1])  # save the message id
+        length = rv[-3]
+        rv = pymqe.MQGET(self.__qMgr.getHandle(), self.__qHandle,
+                         mDesc.pack(), getOpts.pack(), length)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+        mDesc.unpack(rv[1])
+        getOpts.unpack(rv[2])
+
+        return rv[0]
+
+    def get_rfh2(self, max_length=None, *opts):
+        """get_rfh2([maxLength [, mDesc, getOpts, [rfh2_header_1, ]]])
+
+        Get a message and attempt to unpack the rfh2 headers.
+        opts[2] should be a empty list.
+        Unpacking only attempted if Format in previous header is
+        CMQC.MQFMT_RF_HEADER_2.
+
+        """
+
+        if len(opts) >= 3:
+            if opts[2] is not None:
+                if not isinstance(opts[2], list):
+                    raise exceptions.TypeError("Third item of opts should " \
+                                               "be a list.")
+
+                msg = self.get(max_length, *opts[0:2])
+                mqmd = opts[0]
+                rfh2_headers = []
+                #If format is not CMQC.MQFMT_RF_HEADER_2 then do not parse.
+                format = mqmd["Format"]
+                while format == CMQC.MQFMT_RF_HEADER_2:
+                    rfh2_header = RFH2()
+                    rfh2_header.unpack(msg)
+                    rfh2_headers.append(rfh2_header)
+                    msg = msg[rfh2_header["StrucLength"]:]
+                    format = rfh2_header["Format"]
+                opts[2].extend(rfh2_headers)
+        else:
+            msg = self.get(max_length, *opts)
+
+        return msg
+
+    def close(self, options = CMQC.MQCO_NONE):
+        """close([options])
+
+        Close a queue, using options."""
+
+        if not self.__qHandle:
+            raise PYIFError('not open')
+        rv = pymqe.MQCLOSE(self.__qMgr.getHandle(), self.__qHandle, options)
+        if rv[0]:
+            raise MQMIError(rv[-2], rv[-1])
+        self.__qHandle = self.__qDesc = self.__openOpts = None
+
+    def inquire(self, attribute):
+        """inquire(attribute)
+
+        Inquire on queue 'attribute'. If the queue is not already
+        open, it is opened for Inquire. Returns either the integer or
+        string value for the attribute."""
+
+        if not self.__qHandle:
+            self.__openOpts = CMQC.MQOO_INQUIRE
+            self.__realOpen()
+        rv = pymqe.MQINQ(self.__qMgr.getHandle(), self.__qHandle, attribute)
+        if rv[1]:
+            raise MQMIError(rv[-2], rv[-1])
+        return rv[0]
+
+    def set(self, attribute, arg):
+        """set(attribute, arg)
+
+        Sets the Queue attribute to arg."""
+        if not self.__qHandle:
+            self.__openOpts = CMQC.MQOO_SET
+            self.__realOpen()
+        rv = pymqe.MQSET(self.__qMgr.getHandle(), self.__qHandle, attribute, arg)
+        if rv[1]:
+            raise MQMIError(rv[-2], rv[-1])
+
+    def set_handle(self, queue_handle):
+        """set_handle(queue_handle)
+
+        Sets the queue handle in the case when a handl;e was returned from a
+        previous MQ call.
+
+        """
+
+        self.__qHandle = queue_handle
+
+    def get_handle(self):
+        """get_handle()
+
+        Get the queue handle.
+
+        """
+
+        return self.__qHandle
+
+#Publish Subscribe support - Hannes Wagener 2011
+class Topic:
+    """Topic(queue_manager, topic_name, topic_string, topic_desc, open_opts)
+
+    Topic encapsulates all the Topic I/O operations, including
+    publish/subscribe.  A QueueManager object must be already
+    connected. The Topic may be opened implicitly on construction, or
+    the open may be deferred until a call to open(), pub() or
+    (The same as for Queue).
+
+    The Topic to open is identified either by a topic name and/or a topic
+    string (in which case a default MQOD structure is created using
+    those names), or by passing a ready constructed MQOD class.
+    Refer to the "Using topic strings" section in the MQ7 Information Center
+    for an explanation of how the topic name and topic string is combined
+    to identify a particular topic.
+
+    """
+
+    def __real_open(self):
+        """real_open()
+
+        Really open the topic.  Only do this in pub()?
+
+        """
+
+        if self.__topic_desc == None:
+            raise PYIFError, 'The Topic Descriptor has not been set.'
+
+        rv = pymqe.MQOPEN(self.__queue_manager.getHandle(),
+                          self.__topic_desc.pack(), self.__open_opts)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+
+        self.__topic_handle = rv[0]
+        self.__topic_desc.unpack(rv[1])
+
+    def __init__(self, queue_manager, topic_name=None, topic_string=None, topic_desc=None, open_opts=None):
+        """Topic(queue_manager, [topic_name, topic_string, topic_desc [,open_opts]])
+
+        Associate a Topic instance with the QueueManager object 'queue_manager'
+        and optionally open the Topic.
+
+        If topic_desc is passed ignore topic_string and topic_name.
+
+        If open_opts is passed, it specifies topic open options, and
+        the topic is opened immediately. If open_opts is not passed,
+        the queue open is deferred to a subsequent call to open(),
+        pub().
+
+        The following table clarifies when the Topic is opened:
+
+        topic_desc  open_opts   When opened
+             N       N       open()
+             Y       N       open() or pub()
+             Y       Y       Immediately
+        """
+
+        self.__queue_manager = queue_manager
+        self.__topic_handle = None
+        self.__topic_desc = topic_desc
+        self.__open_opts = open_opts
+
+        self.topic_name = topic_name
+        self.topic_string = topic_string
+
+        if self.__topic_desc:
+            if self.__topic_desc["ObjectType"] is not CMQC.MQOT_TOPIC:
+                raise PYIFError, 'The Topic Descriptor ObjectType is not '\
+                                 'MQOT_TOPIC.'
+            if self.__topic_desc["Version"] is not CMQC.MQOD_VERSION_4:
+                raise PYIFError, 'The Topic Descriptor Version is not '\
+                                 'MQOD_VERSION_4.'
+        else:
+            self.__topic_desc = self.__create_topic_desc(topic_name, topic_string)
+
+        if self.__open_opts:
+            self.__real_open()
+
+    def __create_topic_desc(self, topic_name, topic_string):
+        """__create_topic(topic_name, topic_string)
+
+        Creates a topic object descriptor from a given topic_name/topic_string.
+
+        """
+
+        topic_desc = od()
+        topic_desc["ObjectType"] = CMQC.MQOT_TOPIC
+        topic_desc["Version"] = CMQC.MQOD_VERSION_4
+
+        if topic_name:
+            topic_desc["ObjectName"] = topic_name
+
+        if topic_string:
+            topic_desc.set_vs("ObjectString", topic_string, 0, 0, 0)
+
+        return topic_desc
+
+    def __del__(self):
+        """__del__()
+
+        Close the Topic, if it has been opened."""
+        try:
+            if self.__topic_handle:
+                self.close()
+        except:
+            pass
+
+    def open(self, topic_name=None, topic_string=None, topic_desc=None, open_opts=None):
+        """open(topic_name, topic_string, topic_desc, open_opts)
+
+        Open the Topic specified by topic_desc or create a object descriptor
+        from topic_name and topic_string.
+        If open_opts is passed, it defines the
+        Topic open options, and the Topic is opened immediately. If
+        open_opts is not passed, the Topic open is deferred until a
+        subsequent pub() call.
+
+        """
+
+        if self.__topic_handle:
+            raise PYIFError('The Topic is already open.')
+
+        if topic_name:
+            self.topic_name = topic_name
+
+        if topic_string:
+            self.topic_string = topic_string
+
+        if topic_desc:
+            self.__topic_desc = topic_desc
+        else:
+            self.__topic_desc = self.__create_topic_desc(self.topic_name, self.topic_string)
+
+        if open_opts:
+            self.__open_opts = open_opts
+            self.__real_open()
+
+    def pub(self, msg, *opts):
+        """pub(msg[, msg_desc ,put_opts])
+
+        Publish the string buffer 'msg' to the Topic. If the Topic is not
+        already open, it is opened now. with the option 'MQOO_OUTPUT'.
+
+        msg_desc is the pymqi.md() MQMD Message Descriptor for the
+        message. If it is not passed, or is None, then a default md()
+        object is used.
+
+        put_opts is the pymqi.pmo() MQPMO Put Message Options structure
+        for the put call. If it is not passed, or is None, then a
+        default pmo() object is used.
+
+        If msg_desc and/or put_opts arguments were supplied, they may be
+        updated by the put operation.
+
+        """
+
+        msg_desc, put_opts = apply(commonQArgs, opts)
+
+        if put_opts == None:
+            put_opts = pmo()
+
+        # If queue open was deferred, open it for put now
+        if not self.__topic_handle:
+            self.__open_opts = CMQC.MQOO_OUTPUT
+            self.__real_open()
+        # Now send the message
+        rv = pymqe.MQPUT(self.__queue_manager.getHandle(), self.__topic_handle, msg_desc.pack(),
+                         put_opts.pack(), msg)
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+
+        msg_desc.unpack(rv[0])
+        put_opts.unpack(rv[1])
+
+    def sub(self, *opts):
+        """sub(sub_desc, sub_queue)
+
+        Subscribe to the topic and return a Subscription object.
+        A subscription to a topic can be made using an existing queue, either
+        by pasing a Queue object or a string at which case the queue will
+        be opened with default options.
+
+        """
+
+        sub_desc = None
+        if len(opts) > 0:
+            sub_desc = opts[0]
+
+        sub_queue = None
+        if len(opts) > 1:
+            sub_queue = opts[1]
+
+        sub = Subscription(self.__queue_manager)
+        sub.sub(sub_desc=sub_desc, sub_queue=sub_queue, topic_name=self.topic_name, topic_string=self.topic_string)
+
+        return sub
+
+    def close(self, options = CMQC.MQCO_NONE):
+        """close([options])
+
+        Close the topic, using options.
+
+        """
+
+        if not self.__topic_handle:
+            raise PYIFError('Topic not open.')
+
+        rv = pymqe.MQCLOSE(self.__queue_manager.getHandle(), self.__topic_handle, options)
+        if rv[0]:
+            raise MQMIError(rv[-2], rv[-1])
+
+        self.__topic_handle = None
+        self.__topic_desc = None
+        self.__open_opts = None
+
+
+class Subscription:
+    """Subscription(queue_manager, sub_descm sub_name, sub_queue, topic_name,
+                    topic_string)
+
+    Subscription encapsulates a subscription to a topic.
+
+    """
+    def __init__(self, queue_manager, sub_desc=None, sub_name=None,
+                 sub_queue=None, sub_opts=None, topic_name=None, topic_string=None):
+        self.__queue_manager = queue_manager
+        self.sub_queue = sub_queue
+        self.__sub_desc = sub_desc
+        self.sub_name = sub_name
+        self.sub_opts = sub_opts
+        self.topic_name = topic_name
+        self.topic_string = topic_string
+
+        if self.__sub_desc:
+            self.sub(sub_desc=self.__sub_desc)
+
+    def get_sub_queue(self):
+        """get_sub_queue()
+
+        Return the subscription queue.
+
+        """
+        return self.sub_queue
+
+
+    def get(self, max_length=None, *opts):
+        """
+
+        Get a publication from the Queue.
+
+        """
+
+        return self.sub_queue.get(max_length, *opts)
+
+    def sub(self, sub_desc=None, sub_queue=None, sub_name=None, sub_opts=None,
+            topic_name=None, topic_string=None):
+        """sub(sub_desc, sub_queue)
+
+        Subscribe to a topic, alter or resume a subscription.
+        Executes the MQSUB call with parameters.
+        The subscription queue can be either passed as a Queue object or a
+        Queue object handle.
+
+        """
+
+        if topic_name:
+            self.topic_name = topic_name
+        if topic_string:
+            self.topic_string = topic_string
+        if sub_name:
+            self.sub_name = sub_name
+
+        if sub_desc:
+            if not isinstance(sub_desc, SD):
+                raise exceptions.TypeError("sub_desc must be a " \
+                                               "SD(sub descriptor) object.")
+        else:
+            sub_desc = SD()
+            if sub_opts:
+                sub_desc["Options"] = sub_opts
+            else:
+                sub_desc["Options"] = CMQC.MQSO_CREATE + \
+                                      CMQC.MQSO_NON_DURABLE + \
+                                      CMQC.MQSO_MANAGED
+            if self.sub_name:
+                sub_desc.set_vs("SubName", self.sub_name)
+            if self.topic_name:
+                sub_desc["ObjectName"] = self.topic_name
+            if self.topic_string:
+                sub_desc.set_vs("ObjectString", self.topic_string)
+        self.__sub_desc = sub_desc
+
+        sub_queue_handle = CMQC.MQHO_NONE
+        if sub_queue:
+            if isinstance(sub_queue, Queue):
+                sub_queue_handle = sub_queue.get_handle()
+            else:
+                sub_queue_handle = sub_queue
+
+        rv = pymqe.MQSUB(self.__queue_manager.getHandle(), sub_desc.pack(),
+                         sub_queue_handle)
+
+        if rv[-2]:
+            raise MQMIError(rv[-2], rv[-1])
+
+        sub_desc.unpack(rv[0])
+        self.__sub_desc = sub_desc
+        self.sub_queue = Queue(self.__queue_manager)
+        self.sub_queue.set_handle(rv[1])
+        self.__sub_handle = rv[2]
+
+    def close(self, sub_close_options=CMQC.MQCO_NONE, close_sub_queue=False, close_sub_queue_options=CMQC.MQCO_NONE):
+
+        if not self.__sub_handle:
+            raise PYIFError('Subscription not open.')
+
+        rv = pymqe.MQCLOSE(self.__queue_manager.getHandle(), self.__sub_handle, sub_close_options)
+        if rv[0]:
+            raise MQMIError(rv[-2], rv[-1])
+
+        self.__sub_handle = None
+        self.__sub_desc = None
+        self.__open_opts = None
+
+        if close_sub_queue:
+            self.sub_queue.close(close_sub_queue_options)
+
+    def __del__(self):
+        """__del__()
+
+        Close the Subscription, if it has been opened."""
+        try:
+            if self.__sub_handle:
+                self.close()
+        except:
+            pass
+            
+class MessageHandle(object):
+    """ A higher-level wrapper around the MQI's native MQCMHO structure.
+    """
+
+    # When accessing message properties, this will be the maximum number
+    # of characters a value will be able to hold. If it's not enough
+    # an exception will be raised and its 'actual_value_length' will be
+    # filled in with the information of how many characters there are actually
+    # so that an application may re-issue the call.
+    default_value_length = 64
+
+    class _Properties(object):
+        """ Encapsulates access to message properties.
+        """
+        def __init__(self, conn_handle, msg_handle):
+            self.conn_handle = conn_handle
+            self.msg_handle = msg_handle
+
+        def __getitem__(self, name):
+            """ Allows for a dict-like access to properties,
+            handle.properties[name]
+            """
+            value = self.get(name)
+            if not value:
+                raise KeyError('No such property [%s]' % name)
+
+            return value
+
+        def __setitem__(self, name, value):
+            """ Implements 'handle.properties[name] = value'.
+            """
+            return self.set(name, value)
+
+        def get(self, name, default=None, max_value_length=None,
+                impo_options=CMQC.MQIMPO_INQ_FIRST, pd=CMQC.MQPD_NONE,
+                property_type=CMQC.MQTYPE_AS_SET):
+            """ Returns the value of message property 'name'. 'default' is the
+            value to return if the property is missing. 'max_value_length'
+            is the maximum number of characters the underlying pymqe function
+            is allowed to allocate for fetching the value
+            (defaults to MessageHandle.default_value_length). 'impo_options'
+            and 'pd_options' describe options of MQPD and MQIMPO structures
+            to be used and 'property_type' points to the expected data type
+            of the property.
+            """
+            if not max_value_length:
+                max_value_length = MessageHandle.default_value_length
+
+            comp_code, comp_reason, value = pymqe.MQINQMP(self.conn_handle,
+                    self.msg_handle, impo_options, name, impo_options,
+                    property_type, max_value_length)
+
+            if comp_code != CMQC.MQCC_OK:
+                raise MQMIError(comp_code, comp_reason)
+
+            return value
+
+
+        def set(self, name, value, property_type=CMQC.MQTYPE_STRING,
+                value_length=CMQC.MQVL_NULL_TERMINATED, pd=None, smpo=None):
+            """ Allows for setting arbitrary properties of a message. 'name'
+            and 'value' are mandatory. All other parameters are OK to use as-is
+            if 'value' is a string. If it isn't a string, the 'property_type'
+            and 'value_length' should be set accordingly. For further
+            customization, you can also use 'pd' and 'smpo' parameters for
+            passing in MQPD and MQSMPO structures.
+            """
+            pd = pd if pd else PD()
+            smpo = smpo if smpo else SMPO()
+
+            comp_code, comp_reason = pymqe.MQSETMP(self.conn_handle,
+                    self.msg_handle, smpo.pack(), name, pd.pack(),
+                    property_type, value, value_length)
+
+            if comp_code != CMQC.MQCC_OK:
+                raise MQMIError(comp_code, comp_reason)
+
+    def __init__(self, qmgr=None, cmho=None):
+        self.conn_handle = qmgr.get_handle() if qmgr else CMQC.MQHO_NONE
+        cmho = cmho if cmho else CMHO()
+
+        comp_code, comp_reason, self.msg_handle = pymqe.MQCRTMH(self.conn_handle,
+                                                            cmho.pack())
+
+        if comp_code != CMQC.MQCC_OK:
+            raise MQMIError(comp_code, comp_reason)
+
+        self.properties = self._Properties(self.conn_handle, self.msg_handle)
+        
+class _Filter(object):
+    """ The base class for MQAI filters. The initializer expectes user to provide
+    the selector, value and the operator to use. For instance, the can be respectively
+    MQCA_Q_DESC, 'MY.QUEUE.*', MQCFOP_LIKE. Compare with the pymqi.Filter class.
+    """
+    _pymqi_filter_type = None
+    
+    def __init__(self, selector, value, operator):
+        self.selector = selector
+        self.value = value
+        self.operator = operator
+        
+    def __repr__(self):
+        msg = '<%s at %s %s:%s:%s>'
+        return msg % (self.__class__.__name__, hex(id(self)), self.selector, 
+                      self.value, self.operator)
+
+class StringFilter(_Filter):
+    """ A subclass of pymqi._Filter suitable for passing MQAI string filters around.
+    """
+    _pymqi_filter_type = 'string'
+    
+class IntegerFilter(_Filter):
+    """ A subclass of pymqi._Filter suitable for passing MQAI integer filters around.
+    """
+    _pymqi_filter_type = 'integer'
+    
+class FilterOperator(object):
+    """ Creates low-level filters basing on what's been provided in the high-level
+    pymqi.Filter object.
+    """
+    operator_mapping = {
+        'less': CMQCFC.MQCFOP_LESS,
+        'equal': CMQCFC.MQCFOP_EQUAL,
+        'greater': CMQCFC.MQCFOP_GREATER,
+        'not_less': CMQCFC.MQCFOP_NOT_LESS,
+        'not_equal': CMQCFC.MQCFOP_NOT_EQUAL,
+        'not_greater': CMQCFC.MQCFOP_NOT_GREATER,
+        'like': CMQCFC.MQCFOP_LIKE,
+        'not_like': CMQCFC.MQCFOP_NOT_LIKE,
+        'contains': CMQCFC.MQCFOP_CONTAINS,
+        'excludes': CMQCFC.MQCFOP_EXCLUDES,
+        'contains_gen': CMQCFC.MQCFOP_CONTAINS_GEN,
+        'excludes_gen': CMQCFC.MQCFOP_EXCLUDES_GEN,
+        }
+    
+    def __init__(self, pub_filter):
+        self.pub_filter = pub_filter
+        
+    def __call__(self, value):
+        
+        # Do we support the given attribute filter?
+        if self.pub_filter.selector >= CMQC.MQIA_FIRST and self.pub_filter.selector <= CMQC.MQIA_LAST:
+            priv_filter_class = IntegerFilter
+        elif self.pub_filter.selector >= CMQC.MQCA_FIRST and self.pub_filter.selector <= CMQC.MQCA_LAST:
+            priv_filter_class = StringFilter
+        else:
+            msg = 'selector [%s] is of an unsupported type (neither integer ' \
+                'nor a string attribute). Send details to http://packages.' \
+                'python.org/pymqi/support-consulting-contact.html'
+            raise Error(msg % self.pub_filter.selector)
+
+        # Do we support the operator?
+        operator = self.operator_mapping.get(self.pub_filter.operator)
+        if not operator:
+            msg = 'Operator [%s] is not supported.'
+            raise Error(msg % self.pub_filter.operator)
+
+        return priv_filter_class(self.pub_filter.selector, value, operator)
+    
+class Filter(object):
+    """ The user-facing MQAI filtering class which provides syntactic sugar
+    on top of pymqi._Filter and its base classes.
+    """
+    def __init__(self, selector):
+        self.selector = selector
+        self.operator = None
+        
+    def __getattribute__(self, name):
+        """ A generic method for either fetching the pymqi.Filter object's
+        attributes or calling magic methods like 'like', 'contains' etc.
+        """
+        if name in('selector', 'operator'):
+            return object.__getattribute__(self, name)
+        self.operator = name
+                
+        return FilterOperator(self)
+#
+# This piece of magic shamelessly plagiarised from xmlrpclib.py. It
+# works a bit like a C++ STL functor.
+#
+class _Method:
+    def __init__(self, pcf, name):
+        self.__pcf = pcf
+        self.__name = name
+
+    def __getattr__(self, name):
+        return _Method(self.__pcf, "%s.%s" % (self.__name, name))
+
+    def __call__(self, *args):
+        if self.__name[0:7] == 'CMQCFC.':
+            self.__name = self.__name[7:]
+        if self.__pcf.qm:
+            qmHandle = self.__pcf.qm.getHandle()
+        else:
+            qmHandle = self.__pcf.getHandle()
+        if len(args):
+            rv = pymqe.mqaiExecute(qmHandle, CMQCFC.__dict__[self.__name], *args)
+        else:
+            rv = pymqe.mqaiExecute(qmHandle, CMQCFC.__dict__[self.__name])
+        if rv[1]:
+            raise MQMIError(rv[-2], rv[-1])
+        return rv[0]
+
+#
+# Execute a PCF commmand. Inspired by Maas-Maarten Zeeman
+#
+
+class PCFExecute(QueueManager):
+
+    """Send PCF commands or inquiries using the MQAI
+    interface. PCFExecute must be connected to the Queue Manager
+    (using one of the techniques inherited from QueueManager) before
+    its used. PCF commands are executed by calling a CMQCFC defined
+    MQCMD_* method on the object.  """
+
+    iaStringDict = _MQConst2String(CMQC, "MQIA_")
+    caStringDict = _MQConst2String(CMQC, "MQCA_")
+
+    def __init__(self, name = ''):
+        """PCFExecute(name = '')
+
+        Connect to the Queue Manager 'name' (default value '') ready
+        for a PCF command. If name is a QueueManager instance, it is
+        used for the connection, otherwise a new connection is made """
+
+        if isinstance(name, QueueManager):
+            self.qm = name
+            QueueManager.__init__(self, None)
+        else:
+            self.qm = None
+            QueueManager.__init__(self, name)
+
+    def __getattr__(self, name):
+        """MQCMD_*(attrDict)
+
+        Execute the PCF command or inquiry, passing an an optional
+        dictionary of MQ attributes.  The command must begin with
+        MQCMD_, and must be one of those defined in the CMQCFC
+        module. If attrDict is passed, its keys must be an attribute
+        as defined in the CMQC or CMQCFC modules (MQCA_*, MQIA_*,
+        MQCACH_* or MQIACH_*). The key value must be an int or string,
+        as appropriate.
+
+        If an inquiry is executed, a list of dictionaries (one per
+        matching query) is returned. Each dictionary encodes the
+        attributes and values of the object queried. The keys are as
+        defined in the CMQC module (MQIA_*, MQCA_*), The values are
+        strings or ints, as appropriate.
+
+        If a command was executed, or no inquiry results are
+        available, an empty listis returned.  """
+
+        return _Method(self, name)
+
+    def stringifyKeys(self, rawDict):
+        """stringifyKeys(rawDict)
+
+        Return a copy of rawDict with its keys converted to string
+        mnemonics, as defined in CMQC. """
+
+        rv = {}
+        for k in rawDict.keys():
+            if type(rawDict[k]) is types.StringType:
+                d = PCFExecute.caStringDict
+            else:
+                d = PCFExecute.iaStringDict
+            try:
+                rv[d[k]] = rawDict[k]
+            except KeyError, e:
+                rv[k] = rawDict[k]
+        return rv
+
+    # Backward compatibility
+    stringify_keys = stringifyKeys
+
+class ByteString(object):
+    """ A simple wrapper around string values, suitable for passing into PyMQI
+    calls wherever IBM's docs state a 'byte string' object should be passed in.
+    """
+    def __init__(self, value):
+        self.value = value
+        self.pymqi_byte_string = True
+
+    def __len__(self):
+        return len(self.value)
+    
+def connect(queue_manager, channel=None, conn_info=None):
+    """ A convenience wrapper for connecting to MQ queue managers. If given the
+    'queue_manager' parameter only, will try connecting to it in bindings mode.
+    If given both 'channel' and 'conn_info' will connect in client mode.
+    A pymqi.QueueManager is returned on successfully establishing a connection.
+    """
+    if queue_manager and channel and conn_info:
+        qmgr = QueueManager(None)
+        qmgr.connect_tcp_client(queue_manager, CD(), channel, conn_info)
+        return qmgr
+    
+    elif queue_manager:
+        qmgr = QueueManager(queue_manager)
+        return qmgr
diff --git a/code/setup.py b/code/setup.py
new file mode 100755
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS9zZXR1cC5weQ==
--- /dev/null
+++ b/code/setup.py
@@ -0,0 +1,155 @@
+# Setup script usable for distutils.
+#
+# Original Author: Maas-Maarten Zeeman
+#
+# Linux build is re-entrant/multithreaded.
+
+import sys, os
+from struct import calcsize
+
+try:
+    from distribute.core import setup
+except ImportError:
+    from setuptools import setup
+
+from distutils.core import Extension
+
+version = "1.3"
+
+# Munge the args if a server or client build was asked for.
+build_server = 0
+if sys.argv[-1] == 'server':
+    build_server = 1
+    sys.argv = sys.argv[:-1]
+if sys.argv[-1] == 'client':
+    build_server = 0
+    sys.argv = sys.argv[:-1]
+
+# Are we running 64bits?
+if calcsize("P") == 8:
+    bits = 64
+else:
+    bits = 32
+
+def get_windows_settings():
+    """ Windows settings.
+    """
+    if bits == 64:
+        library_dirs = [r"c:\Program Files (x86)\IBM\WebSphere MQ\tools\Lib64"]
+        include_dirs = [r"c:\Program Files (x86)\IBM\WebSphere MQ\tools\c\include"]
+    else:
+        library_dirs = [r"c:\Program Files\IBM\WebSphere MQ\Tools\Lib"]
+        include_dirs = [r"c:\Program Files\IBM\WebSphere MQ\tools\c\include"]
+
+    if build_server:
+        libraries = ['mqm']
+    else:
+        if bits == 64:
+            libraries = ['mqic']
+        else:
+            libraries = ['mqic32']
+
+    return library_dirs, include_dirs, libraries
+
+def get_sunos_zlinux_settings():
+    """ SunOS and z/Linux settings.
+    """
+    if bits == 64:
+        library_dirs = ['/opt/mqm/lib64']
+    else:
+        library_dirs = ['/opt/mqm/lib']
+
+    include_dirs = ['/opt/mqm/inc']
+
+    if build_server:
+        libraries = ['mqm','mqmcs','mqmzse']
+    else:
+        libraries = ['mqic']
+
+    return library_dirs, include_dirs, libraries
+
+def get_aix_settings():
+    """ AIX settings.
+    """
+    if bits == 64:
+        library_dirs = ['/usr/mqm/lib64']
+    else:
+        library_dirs = ['/usr/mqm/lib']
+
+    include_dirs = ['/usr/mqm/inc']
+
+    if build_server:
+        libraries = ['mqm_r']
+    else:
+        libraries = ['mqic_r']
+
+    return library_dirs, include_dirs, libraries
+
+def get_generic_unix_settings():
+    """ Generic UNIX, including Linux, settings.
+    """
+    if bits == 64:
+        library_dirs = ['/opt/mqm/lib64']
+    else:
+        library_dirs = ['/opt/mqm/lib']
+
+    include_dirs = ['/opt/mqm/inc']
+
+    if build_server:
+        libraries = ['mqm_r']
+    else:
+        libraries = ['mqic_r']
+
+    return library_dirs, include_dirs, libraries
+
+# Windows
+if sys.platform == 'win32':
+    library_dirs, include_dirs, libraries = get_windows_settings()
+
+# SunOS and z/Linux
+elif sys.platform == 'sunos5' or sys.platform == 'linux-s390':
+    library_dirs, include_dirs, libraries = get_sunos_zlinux_settings()
+
+# AIX
+elif sys.platform.startswith('aix'):
+    library_dirs, include_dirs, libraries = get_aix_settings()
+
+# Try generic UNIX for any other platform, including Linux
+else:
+    library_dirs, include_dirs, libraries = get_generic_unix_settings()
+
+
+if build_server:
+    print "Building PyMQI server %sbits" % bits
+else:
+    print "Building PyMQI client %sbits" % bits
+
+
+setup(name = "pymqi",
+    version = version,
+    description = "Python IBM MQI Extension for WebSphere MQ (formerly known as MQSeries).",
+    long_description= "PyMQI is a Python library for working with WebSphere MQ (formerly known as MQSeries) implementing MQI and PCF protocols.",
+    author="Dariusz Suchojad",
+    author_email="dsuch at gefira.pl",
+    url="https://pythonhosted.org/pymqi/",
+    download_url="https://pypi.python.org/pypi/pymqi",
+    platforms="OS Independent",
+    py_modules = ["pymqi", "CMQC", "CMQCFC", "CMQXC", "CMQZC"],
+    license='Python Software Foundation License',
+    keywords=('pymqi WebSphere MQ WMQ MQSeries IBM middleware messaging queueing asynchronous SOA EAI ESB integration'),
+    classifiers = [
+        'Development Status :: 5 - Production/Stable',
+        'License :: OSI Approved :: Python Software Foundation License',
+        'Intended Audience :: Developers',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Programming Language :: C',
+        'Programming Language :: Python',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'Topic :: Software Development :: Object Brokering',
+        ],
+    ext_modules = [Extension("pymqe",["pymqe.c"],
+            define_macros=[('PYQMI_SERVERBUILD', build_server)],
+        library_dirs = library_dirs,
+        include_dirs = include_dirs,
+        libraries = libraries)])
diff --git a/code/tests/README b/code/tests/README
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy9SRUFETUU=
--- /dev/null
+++ b/code/tests/README
@@ -0,0 +1,15 @@
+
+How to run the PyMQI's test suite
+================================
+
+* The test suite itself requires at least Python 2.5 because of its reliance
+  on the 'uuid' module which has been introduced in 2.5
+
+* Install nose and testfixtures
+  $ sudo pip install nose
+  $ sudo pip install testfixtures
+
+* Use nose to execute the tests
+  $ nosetests
+
+* (That's all)
\ No newline at end of file
diff --git a/code/tests/create_mq_objects.py b/code/tests/create_mq_objects.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy9jcmVhdGVfbXFfb2JqZWN0cy5weQ==
--- /dev/null
+++ b/code/tests/create_mq_objects.py
@@ -0,0 +1,85 @@
+'''
+Created on 17 Nov 2010
+
+This script creates the MQ objects required for the test suite.
+
+@author: hannes
+'''
+
+import subprocess
+import sys
+import time
+
+mqsc_script = """
+DEFINE CHL(SVRCONN.1) CHLTYPE(SVRCONN)
+DEFINE LISTENER(TCP.LISTENER.1) TRPTYPE(TCP) PORT(31414) CONTROL(QMGR) REPLACE
+START LISTENER(TCP.LISTENER.1)
+DEFINE QL(RFH2.TEST) REPLACE
+"""
+
+print "Creating all MQ Objects required to run the test.\n"
+
+print "Checking if Queue Manager QM01 exists.\n"
+dspmq_proc = subprocess.Popen(["dspmq", "-mQM01"], stdout=subprocess.PIPE,
+                              stderr=subprocess.PIPE)
+dspmq_output, dspmq_error = dspmq_proc.communicate()
+
+if dspmq_proc.returncode == 72:
+    print "Queue manager QM01 does not exist.  Attempting to create.\n"
+    crtmqm_proc = subprocess.Popen(["crtmqm", "QM01"],
+                                   stdout=subprocess.PIPE,
+                                   stderr=subprocess.PIPE)
+    crtmqm_output, crtmqm_error = crtmqm_proc.communicate()
+    if crtmqm_proc.returncode != 0:
+        print "Error Occured while creating Queue Manager QM01.\n"
+        print "-" * len(crtmqm_error) + "\n"
+        print crtmqm_error
+        print "-" * len(crtmqm_error) + "\n"
+        print "Failed to setup MQ Enviromment!\n"
+        sys.exit(1)
+    print "Queue manager QM01 created.\n"
+else:
+    if dspmq_proc.returncode == 0:
+        print "Queue Manager Exists.\n"
+        print "-" * len(dspmq_output) + "\n"
+        print dspmq_output
+        print "-" * len(dspmq_output) + "\n"
+    else:
+        print "Error Occured\n"
+        print "-" * len(dspmq_error) + "\n"
+        print dspmq_error
+        print "-" * len(dspmq_error) + "\n"
+        print "Failed to setup MQ Enviromment!\n"
+        sys.exit(1)
+
+strmqm_proc = subprocess.Popen(["strmqm", "QM01"], stdout=subprocess.PIPE,
+                               stderr=subprocess.PIPE)
+strmqm_output, strmqm_error = strmqm_proc.communicate()
+
+if strmqm_proc.returncode == 5:
+    print strmqm_error
+else:
+    if strmqm_proc.returncode != 0:
+        print "Error.  Could not start Queue Manager."
+        print "-" * len(strmqm_error) + "\n"
+        print strmqm_error
+        print "-" * len(strmqm_error) + "\n"
+        sys.exit(1)
+
+time.sleep(2)
+
+print "Creating MQ Objects."
+runmqsc_proc = subprocess.Popen(["runmqsc", "QM01"],
+                                stdout=subprocess.PIPE, stdin=subprocess.PIPE,
+                                stderr=subprocess.PIPE)
+runmqsc_output, runmqsc_error = runmqsc_proc.communicate(mqsc_script)
+print "-" * 80 + "\n"
+print runmqsc_output
+print "-" * 80 + "\n"
+if runmqsc_proc.returncode not in (0, 10):
+    print "Creation of MQ Objects not successful."
+    print "-" * 80 + "\n"
+    print runmqsc_error
+    print "-" * 80 + "\n"
+
+print "MQ Environment Created.  Ready for tests.\n"
diff --git a/code/tests/delete_mq_objects.py b/code/tests/delete_mq_objects.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy9kZWxldGVfbXFfb2JqZWN0cy5weQ==
--- /dev/null
+++ b/code/tests/delete_mq_objects.py
@@ -0,0 +1,93 @@
+'''
+Created on 17 Nov 2010
+
+This script creates the MQ objects required for the test suite.
+
+@author: hannes
+'''
+
+import subprocess
+import sys
+import time
+
+
+mqsc_script = """
+DEFINE LISTENER(TEST.LISTENER) TRPTYPE(TCP) PORT(31414) CONTROL(QMGR) REPLACE
+START LISTENER(TEST.LISTENER)
+DEFINE QL(RFH2.TEST) REPLACE
+"""
+
+print "Creating all MQ Objects required to run the test.\n"
+
+print "Checking if Queue Manager QM01 exists.\n"
+dspmq_proc = subprocess.Popen(["dspmq", "-mQM01"], stdout=subprocess.PIPE,
+                              stderr=subprocess.PIPE)
+dspmq_output, dspmq_error = dspmq_proc.communicate()
+
+if dspmq_proc.returncode == 72:
+    print "Queue manager QM01 does not exist.  Nothing to do. Exiting.\n"
+    sys.exit(0)
+else:
+    if dspmq_proc.returncode != 0:
+        print "Error Occurred\n"
+        print "-" * len(dspmq_error) + "\n"
+        print dspmq_error
+        print "-" * len(dspmq_error) + "\n"
+        print "Failed to setup MQ Environment!\n"
+        sys.exit(1)
+
+print "Stopping Queue Manager.\n"
+endmqm_proc = subprocess.Popen(["endmqm", "QM01"], stdout=subprocess.PIPE,
+                               stderr=subprocess.PIPE)
+endmqm_output, endmqm_error = endmqm_proc.communicate()
+print endmqm_error
+start = time.time()
+time_up = 60 - (time.time() - start)
+current_disp = start
+disp_time = 5 - (time.time() - current_disp)
+done = False
+while not done:
+    if time_up <= 0:
+        done = True
+    if dspmq_output.count("STATUS(Ended"):
+        done = True
+    if disp_time <= 0:
+        print dspmq_output
+        current_disp = time.time()
+    dspmq_proc = subprocess.Popen(["dspmq", "-mQM01"],
+                                  stdout=subprocess.PIPE,
+                                  stderr=subprocess.PIPE)
+    dspmq_output, dspmq_error = dspmq_proc.communicate()
+    time_up = 60 - (time.time() - start)
+    times = 0
+    disp_time = 5 - (time.time() - current_disp)
+
+if time_up <= 0:
+    print "Could not end Queue Manager.You can try running the script again.\n"
+    print "-" * 80 + "\n"
+    print endmqm_proc.communicate()[1]
+    print "-" * 80 + "\n"
+    sys.exit(0)
+
+print "Queue Manager Stopped.\n"
+
+
+time.sleep(5)
+dltmqm_proc = subprocess.Popen(["dltmqm", "QM01"], stdout=subprocess.PIPE,
+                               stderr=subprocess.PIPE)
+dltmqm_output, dltmqm_error = dltmqm_proc.communicate()
+
+if dltmqm_proc.returncode != 0:
+    print "Error while deleting Queue Manager QM01."
+    print "-" * 80 + "\n"
+    print dltmqm_error
+    print "-" * 80 + "\n"
+    print "MQ Environment not deleted."
+    sys.exit(1)
+
+print "Queue Manager Deleted."
+print "-" * 80 + "\n"
+print dltmqm_error
+print "-" * 80 + "\n"
+
+print "MQ Environment Deleted.\n"
diff --git a/code/tests/messages/multiple_rfh2.dat b/code/tests/messages/multiple_rfh2.dat
new file mode 100644
index 0000000000000000000000000000000000000000..a81a58857d2d734cec9fbc9c67d17bcc3c81175b
GIT binary patch
literal 585
zc%0pjF;BxV5QVRZKfvC>1N%u#45yQTD(VuNxGB5qoFb&SiEKyWr|?twaSX_ITUKVK
z_ui)``<|}03IJ{Z;2U6d2XOmUw_9C3sKg;<0QjUiSf-cBIdke+%dlULgqKX+G{0NE
zk4d5z!R)Mw#SoSPwe{d%jT7F;aT(g0@Jgu7(j1<5hmNo$(lYGk$c^~$6q@wsnGmLn
z(v6Q4CB$kPd-0t8oAF$9T!ip~iaQsTQu?}mwf^0{@3i{=+W}xr&h|`o==sBqr(g+_
PC(Jn2Hzt}tyqar2RXMt|

diff --git a/code/tests/messages/single_rfh2.dat b/code/tests/messages/single_rfh2.dat
new file mode 100644
index 0000000000000000000000000000000000000000..7dbc0900de22625afa57618f61ee29fb93acf6bb
GIT binary patch
literal 333
zc$|%oy-veG5QH~~7obn!f___y(MmuR(U{ndLw`B1EF@oS-JK;Kg-7A>(A_1}RP)Vf
zv_IYcts<g3qRp0Q^FVa}Q@6*ytE!Y!@<jBFC0N1h?3}p_(&>0y&)}O!KQEtF9%GW|
zRXLM2u>iOf(AJ}WH%?`z=XGpr@Lz&9OLKZToO*C^=yW_RQ5yB(IW%eKH36rK(v44u
x8sdJQ2KAEp!+0q=tqQ(Hg|5Z&-xkgef;tTH<)%xp;Kbk@r~1xB^N*>y_6zkHYUTg{

diff --git a/code/tests/run_pymqi_test_suite.py b/code/tests/run_pymqi_test_suite.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy9ydW5fcHltcWlfdGVzdF9zdWl0ZS5weQ==
--- /dev/null
+++ b/code/tests/run_pymqi_test_suite.py
@@ -0,0 +1,27 @@
+'''
+Created on 17 Nov 2010
+
+@author: hannes
+'''
+
+import unittest
+
+import test_rfh2
+import test_h2py
+import test_rfh2_put_get
+
+h2py_suite =  unittest.TestLoader().loadTestsFromTestCase(test_h2py.Testh2py)
+
+rfh2_suite = unittest.TestLoader().loadTestsFromTestCase(test_rfh2.TestRFH2)
+rfh2_put_get_suite = unittest.TestLoader().loadTestsFromTestCase(test_rfh2_put_get.TestRFH2PutGet)
+
+all_suite = unittest.TestSuite([h2py_suite, rfh2_suite])
+
+mq_not_required_tests = [h2py_suite, rfh2_suite]
+mq_required_tests = [rfh2_put_get_suite]
+
+mq_not_required_suite = unittest.TestSuite(mq_not_required_tests)
+mq_required_suite = unittest.TestSuite(mq_required_tests)
+
+unittest.TextTestRunner(verbosity=2).run(mq_not_required_suite)
+unittest.TextTestRunner(verbosity=2).run(mq_required_suite)
diff --git a/code/tests/test_api_transition_pep8.py b/code/tests/test_api_transition_pep8.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy90ZXN0X2FwaV90cmFuc2l0aW9uX3BlcDgucHk=
--- /dev/null
+++ b/code/tests/test_api_transition_pep8.py
@@ -0,0 +1,28 @@
+""" All sorts of tests related to making the API PEP-8 compliant.
+"""
+
+# stdlib
+import sys
+
+sys.path.insert(0, "..")
+
+# nose
+from nose.tools import eq_
+
+# PyMQI
+import pymqi
+
+def test_backward_compatibility():
+    """ Makes sure all the relevant classes and methods have backward-compatible
+    replacements.
+    """
+    eq_(pymqi.gmo, pymqi.GMO)
+    eq_(pymqi.pmo, pymqi.PMO)
+    eq_(pymqi.od, pymqi.OD)
+    eq_(pymqi.md, pymqi.MD)
+    eq_(pymqi.cd, pymqi.CD)
+    eq_(pymqi.sco, pymqi.SCO)
+    eq_(pymqi.QueueManager.connectWithOptions, pymqi.QueueManager.connect_with_options)
+    eq_(pymqi.QueueManager.connectTCPClient, pymqi.QueueManager.connect_tcp_client)
+    eq_(pymqi.QueueManager.getHandle, pymqi.QueueManager.get_handle)
+    eq_(pymqi.PCFExecute.stringifyKeys, pymqi.PCFExecute.stringify_keys)
diff --git a/code/tests/test_h2py.py b/code/tests/test_h2py.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy90ZXN0X2gycHkucHk=
--- /dev/null
+++ b/code/tests/test_h2py.py
@@ -0,0 +1,59 @@
+""" Tests for making sure modules generated automatically by h2py have no
+unwanted duplicate entries.
+"""
+
+# stdlib
+import sys
+import inspect
+import unittest
+
+sys.path.insert(0, "..")
+
+# PyMQI
+import CMQC, CMQXC, CMQCFC
+
+ignore_dups = ["MQOD_CURRENT_LENGTH", "MQPMO_CURRENT_LENGTH", "MQRC_NONE",
+               "MQACH_CURRENT_LENGTH", "MQCD_CURRENT_LENGTH", "MQCD_LENGTH_4",
+               "MQCD_LENGTH_5", "MQCD_LENGTH_6", "MQCD_LENGTH_7", "MQCD_LENGTH_8",
+               "MQCD_LENGTH_9", "MQCFIF_STRUC_LENGTH", "MQCFGR_STRUC_LENGTH",
+               "MQCFIN64_STRUC_LENGTH", "MQCFIN_STRUC_LENGTH", "MQACH_LENGTH_1"]
+
+class Testh2py(unittest.TestCase):
+
+    def test_h2py(self):
+        """ Test that modules generated automatically by h2py have no unwanted duplicate entries.
+        """
+
+        errors = []
+
+        for mod in CMQC, CMQXC, CMQCFC:
+            mq_attrs = []
+            mq_attrs_count = {}
+            dups = {}
+            source_lines = inspect.getsourcelines(mod)
+            for line in source_lines[0]:
+                if line:
+                    line = line.strip()
+                    if line.startswith("MQ"):
+                        mq_attr = line.split()[0].split(",")[0]
+                        mq_attrs.append(mq_attr)
+
+            for mq_attr in mq_attrs:
+                if mq_attr not in mq_attrs_count:
+                    mq_attrs_count[mq_attr] = 1
+                else:
+                    mq_attrs_count[mq_attr] += 1
+
+            for mq_attr, count in mq_attrs_count.items():
+                if count == 1 or(count == 2 and mq_attr in ignore_dups):
+                    continue
+                else:
+                    item = "%s is defined %d times in %s" % (mq_attr, count, mod)
+                    errors.append(item)
+
+        if errors:
+            msg = "\n" + "\n".join(errors)
+            self.fail(msg)
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/code/tests/test_queue_manager.py b/code/tests/test_queue_manager.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy90ZXN0X3F1ZXVlX21hbmFnZXIucHk=
--- /dev/null
+++ b/code/tests/test_queue_manager.py
@@ -0,0 +1,52 @@
+""" Tests for pymqi.QueueManager class.
+"""
+
+# stdlib
+import sys
+from uuid import uuid4
+
+sys.path.insert(0, "..")
+
+# nose
+from nose.tools import eq_
+
+# testfixtures
+from testfixtures import Replacer
+
+# PyMQI
+import pymqi
+
+
+def test_is_connected():
+    """ Makes sure the QueueManager's 'is_connected' property works as expected.
+    """
+    with Replacer() as r:
+        queue_manager = uuid4().hex
+        channel = uuid4().hex
+        host = uuid4().hex
+        port = "1431"
+        conn_info = "%s(%s)" % (host, port)
+
+        for expected in(True, False):
+
+            def _connectTCPClient(*ignored_args, **ignored_kwargs):
+                pass
+
+            def _getattr(self, name):
+                if expected:
+                    class _DummyMethod(object):
+                        pass
+                    # The mere fact of not raising an exception will suffice
+                    # for QueueManager._is_connected to understand it as an
+                    # all's OK condition.
+                    return _DummyMethod
+                else:
+                    raise Exception()
+
+            r.replace('pymqi.QueueManager.connectTCPClient', _connectTCPClient)
+            r.replace('pymqi.PCFExecute.__getattr__', _getattr)
+
+            qmgr = pymqi.QueueManager(None)
+            qmgr.connectTCPClient(queue_manager, pymqi.cd(), channel, conn_info)
+
+            eq_(qmgr.is_connected, expected)
diff --git a/code/tests/test_rfh2.py b/code/tests/test_rfh2.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy90ZXN0X3JmaDIucHk=
--- /dev/null
+++ b/code/tests/test_rfh2.py
@@ -0,0 +1,289 @@
+'''
+Created on 15 Nov 2010
+
+@author: hannes
+'''
+
+import unittest
+import pymqi
+import CMQC
+
+class TestRFH2(unittest.TestCase):
+    """This test case tests the RFH2 class and it's methods.
+    """
+
+    def setUp(self):
+        """ Create a new queue manager (TESTPMQI).
+        Must be run as a user that has 'mqm' access.
+
+        """
+
+        self.single_rfh2_message = open("messages/single_rfh2.dat", "rb").read()
+        self.single_rfh2_message_not_well_formed = self.single_rfh2_message[0:117] + self.single_rfh2_message[121:]
+
+    def test_parse_rfh2(self):
+        """Test that a known correct 3rd party message parses correctly.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message)
+            self.assertEqual(len(rfh2.get()), 14, "Number of attributes incorrect.  Should be %i? But is %s" % (14, str(len(rfh2.get()))))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+        except Exception, e:
+            self.fail(e)
+
+    def test_parse_default_rfh2(self):
+        """Test parsing of default RFH2 only.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message[0:36])
+            self.assertEqual(len(rfh2.get()), 8, "Number of attributes incorrect.  Should be 8? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+        except Exception, e:
+            self.fail(e.message)
+
+    def test_parse_rfh2_with_correct_encoding(self):
+        """Parse known correct message with it's correct encoding.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message, 273)
+            self.assertEqual(len(rfh2.get()), 14, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+
+        except Exception, e:
+            self.fail(e)
+
+    def test_parse_rfh2_with_incorrect_encoding(self):
+        """Parse known correct message with it's incorrect encoding.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message, 546)
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e), "PYMQI Error: RFH2 - Buffer too short. Expected: 469827584 Buffer Length: 333", "Exception Does not mathc expected. Expected: %s But is: %s" % ("PYMQI Error: RFH2 - Buffer too short. Expected: 469827584 Buffer Length: 333", str(e)))
+
+    def test_add_folder(self):
+        """Test the addition of a XML folder.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message)
+            self.assertEqual(len(rfh2.get()), 14, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+
+
+            rfh2.add_folder("<testFolder2><testVar>testValue</testVar></testFolder2>")
+
+            self.assertEqual(len(rfh2.get()), 16, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 344, "StrucLength has incorrect value. Should be: %i But is: %s" % (344, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+            self.assertEqual(rfh2["testFolder2Length"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder2"], "<testFolder2><testVar>testValue</testVar></testFolder2> ", "testFolder2 has incorrect value. Should be: %s But is: %s" % ("<testFolder2><testVar>testValue</testVar></testFolder2> ", str(rfh2["testFolder2"])))
+
+
+
+        except Exception, e:
+            self.fail(e)
+
+    def test_rfh2_pack(self):
+        """Test pack() by comparing output of pack() against original message.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message)
+            self.assertEqual(len(rfh2.get()), 14, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+            self.assertEqual(self.single_rfh2_message[0:rfh2["StrucLength"]], rfh2.pack(), "result of RFH2.pack() not equal to original buffer used in unpack?")
+        except Exception, e:
+            self.fail(e)
+
+
+    def test_rfh2_create(self):
+        """Test the creation of a brand new RFH2.  Compare the resulting byte array against identical known correct message.
+        """
+
+        rfh2 = pymqi.RFH2()
+        new_rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message)
+            new_rfh2["StrucId"] = CMQC.MQRFH_STRUC_ID
+            new_rfh2["Version"] = CMQC.MQRFH_VERSION_2
+            new_rfh2["StrucLength"] = 188
+            new_rfh2["Encoding"] = 273
+            new_rfh2["CodedCharSetId"]= 1208
+            new_rfh2["Format"] =  CMQC.MQFMT_STRING
+            new_rfh2["Flags"] = 0
+            new_rfh2["NameValueCCSID"] = 1208
+            new_rfh2.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            new_rfh2.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+            new_rfh2.add_folder("<mcd><Msd>xmlnsc</Msd></mcd>")
+            self.assertEqual(self.single_rfh2_message[0:rfh2["StrucLength"]], new_rfh2.pack(encoding=273), "New RFH2 Header does not match publishmessage?")
+        except Exception, e:
+            self.fail(e)
+
+    def test_incorrect_strucid_exception(self):
+        """Test exception that occurs if StrucId is incorrect.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message[116:])
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e), "PYMQI Error: RFH2 - StrucId not MQRFH_STRUC_ID. Value: ame>", "StrucId not = '%s'" % (CMQC.MQRFH_STRUC_ID) )
+
+    def test_buffer_too_short_for_default_rfh2_exception(self):
+        """Test exception occurs when buffer is too short for default RFH2.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message[0:32])
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e), "PYMQI Error: RFH2 - Buffer too short. Should be 36 bytes or longer.  Buffer Length: 32", "Not Buffer to short exception?" )
+
+    def test_buffer_too_short_for_complete_rfh2_exception(self):
+        """Test exception occurs when buffer is too short for complete RFH2.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message[0:188])
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e), "PYMQI Error: RFH2 - Buffer too short. Expected: 284 Buffer Length: 188", "Not Buffer to short to parse complete RFH2 exception?" )
+
+    def test_folder_not_well_formed_exception_on_parse(self):
+        """Test exception when parsing a message that contains not well formed XML folder.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.unpack(self.single_rfh2_message_not_well_formed)
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e).count("XML Folder not well formed"), 1)
+
+    def test_folder_not_well_formed_exception_on_add(self):
+        """Test exception when adding a not well formed XML folder.
+        """
+
+        rfh2 = pymqi.RFH2()
+        try:
+            rfh2.add_folder("<a><b>c</a>")
+        except pymqi.PYIFError, e:
+            self.assertEqual(str(e), "PYMQI Error: RFH2 - XML Folder not well formed. Exception: Opening and ending tag mismatch: b line 1 and a, line 1, column 12", "Not XML Folder not well formed on exception (add_folder)?." )
+
+    def test_encoding_on_pack_big_endian(self):
+        """Test that pack() creates numeric fields with correct encoding. Big endian Test.
+        """
+
+        try:
+            rfh2 = pymqi.RFH2()
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_FLOAT_S390)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_DECIMAL_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_FLOAT_IEEE_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_NORMAL + CMQC.MQENC_DECIMAL_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_NORMAL + CMQC.MQENC_FLOAT_IEEE_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_DECIMAL_NORMAL + CMQC.MQENC_FLOAT_IEEE_NORMAL)[4:8], "\x00\x00\x00\x02")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_NORMAL + CMQC.MQENC_DECIMAL_NORMAL + CMQC.MQENC_FLOAT_IEEE_NORMAL)[4:8], "\x00\x00\x00\x02")
+        except Exception, e:
+            self.fail(e)
+
+    def test_encoding_on_pack_small_endian(self):
+        """Test that pack() creates numeric fields with correct encoding. Small endian Test.
+        """
+
+        try:
+            rfh2 = pymqi.RFH2()
+            self.assertEqual(rfh2.pack()[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_NATIVE)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_REVERSED)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_DECIMAL_REVERSED)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_FLOAT_IEEE_REVERSED)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_REVERSED + CMQC.MQENC_DECIMAL_REVERSED)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_INTEGER_REVERSED + CMQC.MQENC_FLOAT_IEEE_REVERSED)[4:8], "\x02\x00\x00\x00")
+            self.assertEqual(rfh2.pack(encoding=CMQC.MQENC_DECIMAL_REVERSED + CMQC.MQENC_FLOAT_IEEE_REVERSED)[4:8], "\x02\x00\x00\x00")
+        except Exception, e:
+            self.fail(e)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/code/tests/test_rfh2_put_get.py b/code/tests/test_rfh2_put_get.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_Y29kZS90ZXN0cy90ZXN0X3JmaDJfcHV0X2dldC5weQ==
--- /dev/null
+++ b/code/tests/test_rfh2_put_get.py
@@ -0,0 +1,348 @@
+'''
+Created on 15 Nov 2010
+
+@author: hannes
+'''
+
+import unittest
+import pymqi
+import CMQC
+
+
+class TestRFH2PutGet(unittest.TestCase):
+    """This test case tests the RFH2 class and it's methods.
+    """
+
+    def setUp(self):
+        """ Create a new queue manager (TESTPMQI).
+        Must be run as a user that has 'mqm' access.
+
+        """
+
+        self.single_rfh2_message = \
+        open("messages/single_rfh2.dat", "rb").read()
+        self.single_rfh2_message_not_well_formed = \
+        self.single_rfh2_message[0:117] + self.single_rfh2_message[121:]
+
+        self.multiple_rfh2_message = \
+        open("messages/multiple_rfh2.dat", "rb").read()
+        self.multiple_rfh2_message_not_well_formed = \
+        self.multiple_rfh2_message[0:117] + self.multiple_rfh2_message[121:]
+
+        queue_manager = "QM01"
+        channel = "SVRCONN.1"
+        socket = "localhost(31414)"
+        queue_name = "RFH2.TEST"
+
+        self.qmgr = None
+        try:
+            if pymqi.__mqbuild__ == 'server':
+                self.qmgr = pymqi.QueueManager('QM01')
+            else:
+                self.qmgr = pymqi.QueueManager(None)
+                self.qmgr.connectTCPClient(queue_manager, pymqi.cd(), channel, socket)
+            self.put_queue = pymqi.Queue(self.qmgr, queue_name)
+            self.get_queue = pymqi.Queue(self.qmgr, queue_name)
+            self.clear_queue(self.get_queue)
+        except Exception, e:
+            raise e
+
+    def tearDown(self):
+        """ Delete queue manager (TESTPMQI).
+
+        """
+        self.put_queue.close()
+        self.get_queue.close()
+        self.qmgr.disconnect()
+
+    def clear_queue(self, queue):
+        try:
+            while(1):
+                queue.get()
+        except Exception, e:
+            if e.reason == 2033:
+                return
+            else:
+                raise e
+
+
+    def test_get_rfh2_single(self):
+        """Use get_rfh2 to get a known correct 3rd party message that contains a single RFH2 header.
+        """
+        try:
+
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+            self.put_queue.put(self.single_rfh2_message, put_mqmd)
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+            rfh2_list = []
+            msg = self.get_queue.get_rfh2(None, get_mqmd, get_opts, rfh2_list)
+
+            self.assertEqual(len(rfh2_list), 1, "Number of RFH2's incorrect.  Should be one.  But is %i" % len(rfh2_list))
+
+            rfh2 = rfh2_list[0]
+            self.assertEqual(len(rfh2.get()), 14, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2.get())))
+            self.assertEqual(rfh2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2["StrucId"])))
+            self.assertEqual(rfh2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2["Version"])))
+            self.assertEqual(rfh2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2["StrucLength"])))
+            self.assertEqual(rfh2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2["Encoding"])))
+            self.assertEqual(rfh2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["CodedCharSetId"])))
+            self.assertEqual(rfh2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_NONE, str(rfh2["Format"])))
+            self.assertEqual(rfh2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2["Flags"])))
+            self.assertEqual(rfh2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2["NameValueCCSID"])))
+            self.assertEqual(rfh2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2["pscLength"])))
+            self.assertEqual(rfh2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2["psc"]) + "<"))
+            self.assertEqual(rfh2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2["testFolderLength"])))
+            self.assertEqual(rfh2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2["testFolder"])))
+            self.assertEqual(rfh2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2["mcdLength"])))
+            self.assertEqual(rfh2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2["mcd"])))
+
+            self.assertEqual(msg, self.single_rfh2_message[rfh2["StrucLength"]:], "Message Payloads do not match?")
+        except Exception, e:
+            self.fail(e)
+
+
+    def test_get_rfh2_multiple(self):
+        """Use get_rfh2 to get a known correct 3rd party message containing Multiples RFH2 headers.
+        """
+
+        try:
+
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+            self.put_queue.put(self.multiple_rfh2_message, put_mqmd)
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+            rfh2_list = []
+            msg = self.get_queue.get_rfh2(None, get_mqmd, get_opts, rfh2_list)
+
+            self.assertEqual(len(rfh2_list), 2, "Number of RFH2's incorrect.  Should be 2.  But is %i" % len(rfh2_list))
+
+            rfh2_1 = rfh2_list[0]
+            self.assertEqual(len(rfh2_1.get()), 12, "Number of attributes incorrect.  Should be 12? But is %s" % str(len(rfh2_1.get())))
+            self.assertEqual(rfh2_1["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2_1["StrucId"])))
+            self.assertEqual(rfh2_1["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2_1["Version"])))
+            self.assertEqual(rfh2_1["StrucLength"], 252, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2_1["StrucLength"])))
+            self.assertEqual(rfh2_1["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2_1["Encoding"])))
+            self.assertEqual(rfh2_1["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2_1["CodedCharSetId"])))
+            self.assertEqual(rfh2_1["Format"], CMQC.MQFMT_RF_HEADER_2, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_RF_HEADER_2, str(rfh2_1["Format"])))
+            self.assertEqual(rfh2_1["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2_1["Flags"])))
+            self.assertEqual(rfh2_1["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2_1["NameValueCCSID"])))
+            self.assertEqual(rfh2_1["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2_1["pscLength"])))
+            self.assertEqual(rfh2_1["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2_1["psc"]) + "<"))
+            self.assertEqual(rfh2_1["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2_1["testFolderLength"])))
+            self.assertEqual(rfh2_1["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2_1["testFolder"])))
+
+            rfh2_2 = rfh2_list[1]
+            self.assertEqual(len(rfh2_2.get()), 14, "Number of attributes incorrect.  Should be 14? But is %s" % str(len(rfh2_2.get())))
+            self.assertEqual(rfh2_2["StrucId"], CMQC.MQRFH_STRUC_ID, "StrucId has incorrect value. Should be: %s But is: %s" % (CMQC.MQRFH_STRUC_ID, str(rfh2_2["StrucId"])))
+            self.assertEqual(rfh2_2["Version"], CMQC.MQRFH_VERSION_2, "Version has incorrect value. Should be: %i But is: %s" % (CMQC.MQRFH_VERSION_2, str(rfh2_2["Version"])))
+            self.assertEqual(rfh2_2["StrucLength"], 284, "StrucLength has incorrect value. Should be: %i But is: %s" % (284, str(rfh2_2["StrucLength"])))
+            self.assertEqual(rfh2_2["Encoding"], 273, "Encoding has incorrect value. Should be: %i But is: %s" % (273, str(rfh2_2["Encoding"])))
+            self.assertEqual(rfh2_2["CodedCharSetId"], 1208, "CodedCharSetId has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2_2["CodedCharSetId"])))
+            self.assertEqual(rfh2_2["Format"], CMQC.MQFMT_STRING, "Format has incorrect value. Should be: %s But is: %s" % (CMQC.MQFMT_STRING, str(rfh2_2["Format"])))
+            self.assertEqual(rfh2_2["Flags"], 0, "Flags has incorrect value. Should be: %i But is: %s" % (0, str(rfh2_2["Flags"])))
+            self.assertEqual(rfh2_2["NameValueCCSID"], 1208, "NameValueCCSID has incorrect value. Should be: %i But is: %s" % (1208, str(rfh2_2["NameValueCCSID"])))
+            self.assertEqual(rfh2_2["pscLength"], 152, "pscLength has incorrect value. Should be: %i But is: %s" % (152, str(rfh2_2["pscLength"])))
+            self.assertEqual(rfh2_2["psc"], "<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", "psc has incorrect value. Should be: %s But is: %s" % ("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc> ", ">" + str(rfh2_2["psc"]) + "<"))
+            self.assertEqual(rfh2_2["testFolderLength"], 56, "testFolderLength has incorrect value. Should be: %i But is: %s" % (56, str(rfh2_2["testFolderLength"])))
+            self.assertEqual(rfh2_2["testFolder"], "<testFolder><testVar>testValue</testVar></testFolder>   ", "testFolder has incorrect value. Should be: %s But is: %s" % ("<testFolder><testVar>testValue</testVar></testFolder>   ", str(rfh2_2["testFolder"])))
+            self.assertEqual(rfh2_2["mcdLength"], 28, "mcdLength has incorrect value. Should be: %i But is: %s" % (28, str(rfh2_2["mcdLength"])))
+            self.assertEqual(rfh2_2["mcd"], "<mcd><Msd>xmlnsc</Msd></mcd>", "mcd has incorrect value. Should be: %s But is: %s" % ("<mcd><Msd>xmlnsc</Msd></mcd>", str(rfh2_2["mcd"])))
+
+
+            self.assertEqual(msg, self.multiple_rfh2_message[rfh2_1["StrucLength"] + rfh2_2["StrucLength"]:], "Message Payloads do not match?")
+
+        except Exception, e:
+            self.fail(e)
+
+    def test_put_rfh2_single(self):
+        """Create and put a new rfh2 and use get to get it from the queue.  Compare it against know correct message.
+        """
+        try:
+
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+
+            put_opts = pymqi.pmo()
+
+            put_rfh2 = pymqi.RFH2()
+            put_rfh2["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2["StrucLength"] = 188
+            put_rfh2["Encoding"] = 273
+            put_rfh2["CodedCharSetId"]= 1208
+            put_rfh2["Format"] =  CMQC.MQFMT_STRING
+            put_rfh2["Flags"] = 0
+            put_rfh2["NameValueCCSID"] = 1208
+            put_rfh2.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+            put_rfh2.add_folder("<mcd><Msd>xmlnsc</Msd></mcd>")
+            put_msg = "<testData><testVar>testValue</testVar></testData>"
+            self.put_queue.put_rfh2(put_msg, put_mqmd, put_opts, [put_rfh2])
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+            get_msg = self.get_queue.get(None, get_mqmd, get_opts)
+
+            self.assertEqual(get_msg, self.single_rfh2_message, "Message got from Queue does not match known correct RFH2 message.")
+        except Exception, e:
+            self.fail(e)
+
+    def test_put_rfh2_multiple(self):
+        """Create and put a new RFH2 message containing multiple RFH2 headers and use get to get it from the queue.  Compare it against know correct message.
+        """
+        try:
+
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+
+            put_opts = pymqi.pmo()
+
+            put_rfh2_1 = pymqi.RFH2()
+            put_rfh2_1["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2_1["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2_1["StrucLength"] = 188
+            put_rfh2_1["Encoding"] = 273
+            put_rfh2_1["CodedCharSetId"]= 1208
+            put_rfh2_1["Format"] =  CMQC.MQFMT_RF_HEADER_2
+            put_rfh2_1["Flags"] = 0
+            put_rfh2_1["NameValueCCSID"] = 1208
+            put_rfh2_1.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2_1.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+
+            put_rfh2_2 = pymqi.RFH2()
+            put_rfh2_2["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2_2["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2_2["StrucLength"] = 188
+            put_rfh2_2["Encoding"] = 273
+            put_rfh2_2["CodedCharSetId"]= 1208
+            put_rfh2_2["Format"] =  CMQC.MQFMT_STRING
+            put_rfh2_2["Flags"] = 0
+            put_rfh2_2["NameValueCCSID"] = 1208
+            put_rfh2_2.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2_2.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+            put_rfh2_2.add_folder("<mcd><Msd>xmlnsc</Msd></mcd>")
+
+            put_msg = "<testData><testVar>testValue</testVar></testData>"
+            self.put_queue.put_rfh2(put_msg, put_mqmd, put_opts, [put_rfh2_1, put_rfh2_2])
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+
+            get_msg = self.get_queue.get(None, get_mqmd, get_opts)
+
+            self.assertEqual(get_msg, self.multiple_rfh2_message, "Message got from Queue does not match known correct RFH2 message.")
+
+        except Exception, e:
+            self.fail(e)
+
+    def test_put_get_rfh2_single(self):
+        """Create and put a new rfh2 with put_rfh2 and use get_rfh2 to get it from the queue.  Compare it against know correct message.
+        """
+        try:
+
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+
+            put_opts = pymqi.pmo()
+
+            put_rfh2 = pymqi.RFH2()
+            put_rfh2["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2["StrucLength"] = 188
+            put_rfh2["Encoding"] = 273
+            put_rfh2["CodedCharSetId"]= 1208
+            put_rfh2["Format"] =  CMQC.MQFMT_STRING
+            put_rfh2["Flags"] = 0
+            put_rfh2["NameValueCCSID"] = 1208
+            put_rfh2.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+            put_rfh2.add_folder("<mcd><Msd>xmlnsc</Msd></mcd>")
+            put_msg = "<testData><testVar>testValue</testVar></testData>"
+
+            put_rfh2_list = [put_rfh2]
+            self.put_queue.put_rfh2(put_msg, put_mqmd, put_opts, put_rfh2_list)
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+            get_rfh2_list = []
+            get_msg = self.get_queue.get_rfh2(None, get_mqmd, get_opts, get_rfh2_list)
+
+            self.assertEqual(len(get_rfh2_list), len(put_rfh2_list), "Number of RFH2's incorrect.  Should be %i.  But is %i" % (len(get_rfh2_list), len(put_rfh2_list)))
+            self.assertEqual(get_rfh2_list[0].get(), put_rfh2_list[0].get()), "Put and Get RFH2 Lists do not match."
+            self.assertEqual(get_msg, put_msg, "Put and Get messages do not match.")
+
+        except Exception, e:
+            self.fail(e)
+
+    def test_put_get_rfh2_multiple(self):
+        """Create and put a new RFH2 message containing multiple RFH2 headers with put_rfh2 and use get_rfh2 to get it from the queue.  Compare it against know correct message.
+        """
+
+        try:
+            put_mqmd = pymqi.md()
+            put_mqmd["Format"] = CMQC.MQFMT_RF_HEADER_2
+            put_mqmd["Encoding"] = 273
+            put_mqmd["CodedCharSetId"] = 1208
+
+            put_opts = pymqi.pmo()
+
+            put_rfh2_1 = pymqi.RFH2()
+            put_rfh2_1["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2_1["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2_1["StrucLength"] = 188
+            put_rfh2_1["Encoding"] = 273
+            put_rfh2_1["CodedCharSetId"]= 1208
+            put_rfh2_1["Format"] =  CMQC.MQFMT_RF_HEADER_2
+            put_rfh2_1["Flags"] = 0
+            put_rfh2_1["NameValueCCSID"] = 1208
+            put_rfh2_1.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2_1.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+
+            put_rfh2_2 = pymqi.RFH2()
+            put_rfh2_2["StrucId"] = CMQC.MQRFH_STRUC_ID
+            put_rfh2_2["Version"] = CMQC.MQRFH_VERSION_2
+            put_rfh2_2["StrucLength"] = 188
+            put_rfh2_2["Encoding"] = 273
+            put_rfh2_2["CodedCharSetId"]= 1208
+            put_rfh2_2["Format"] =  CMQC.MQFMT_STRING
+            put_rfh2_2["Flags"] = 0
+            put_rfh2_2["NameValueCCSID"] = 1208
+            put_rfh2_2.add_folder("<psc><Command>RegSub</Command><Topic>$topictree/topiccat/topic</Topic><QMgrName>DebugQM</QMgrName><QName>PUBOUT</QName><RegOpt>PersAsPub</RegOpt></psc>")
+            put_rfh2_2.add_folder("<testFolder><testVar>testValue</testVar></testFolder>")
+            put_rfh2_2.add_folder("<mcd><Msd>xmlnsc</Msd></mcd>")
+            put_rfh2_list = [put_rfh2_1, put_rfh2_2]
+            put_msg = "<testData><testVar>testValue</testVar></testData>"
+
+            self.put_queue.put_rfh2(put_msg, put_mqmd, put_opts, put_rfh2_list)
+
+            get_mqmd = pymqi.md()
+            get_opts = pymqi.gmo()
+            get_rfh2_list = []
+            get_msg = self.get_queue.get_rfh2(None, get_mqmd, get_opts, get_rfh2_list)
+
+            self.assertEqual(len(get_rfh2_list), len(put_rfh2_list), "Number of RFH2's incorrect.  Should be %i.  But is %i" % (len(get_rfh2_list), len(put_rfh2_list)))
+            self.assertEqual(get_rfh2_list[0].get(), put_rfh2_list[0].get()), "Put and Get RFH2 Lists do not match."
+            self.assertEqual(get_rfh2_list[1].get(), put_rfh2_list[1].get()), "Put and Get RFH2 Lists do not match."
+            self.assertEqual(get_msg, put_msg, "Put and Get messages do not match.")
+
+        except Exception, e:
+            self.fail(e)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9NYWtlZmlsZQ==
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html      to make standalone HTML files"
+	@echo "  dirhtml   to make HTML files named index.html in directories"
+	@echo "  pickle    to make pickle files"
+	@echo "  json      to make JSON files"
+	@echo "  htmlhelp  to make HTML files and a HTML help project"
+	@echo "  qthelp    to make HTML files and a qthelp project"
+	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  changes   to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck to check all external links for integrity"
+	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyMQI.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyMQI.qhc"
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+	      "run these through (pdf)latex."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/README b/docs/README
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9SRUFETUU=
--- /dev/null
+++ b/docs/README
@@ -0,0 +1,1 @@
+This is the source directory containg reST documentation for PyMQI project.
diff --git a/docs/_static/linkedin.png b/docs/_static/linkedin.png
new file mode 100644
index 0000000000000000000000000000000000000000..35c0696415cabffdd50a7cbaaf3e25434e46a9fe
GIT binary patch
literal 1506
zc$@*^1s(c{P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0009OX+uL$P-t&-
zZ*ypGa3D!TLm+T+Z)Rz1WdHzp+KrS?XdG1>$3Jg6p->W`xV9mnJUpbKBw=g?w+J=a
zB;Cd=>oQH6KNMs$`*wHC%k21Oc56!!2}qA^J&Kq9p?E0bNpkSu$sR-k*6Jk)9;*n&
zLN8L*!|b04ZE1fn@Oi)A?|pxN1|AH2TMk2QN!Scx<K}a6Wpz#N|AhgD7z8MLQ8-;H
z6#&X%sM%`*9{+{_xHs{P_={}FtgNnqkU*xE@Y_IUJ>k<p=6oE+AkG09uU@Wz2!V04
z=+1!n3V5ZK;`J0)ROG?H6wvTO6N8ljvMsL`gSZ1YLB$V1>;l<J<ZXgg0PEkC)is&4
z885)e*J0mJecxIHcW%Ss(Y|kN7+zb3?c;slBNqXPLpxFR__1VbgE<)ZquqWq3j4o+
zC)e8T|8BI~Pj14#UHCzJP1EY`So{o0zuld0yIp!7Co=(%h3ltb`2Z|@4qyHWN4|kq
zzk|{cES|vnjP4h!Phx<XMtH&awR$X%InFzBIt;av^MN-xF3Va=<JanOB#nxcX{pL2
zo4V<B>Kz0IRj_mh7zOK770q>6Y*os$3&13Zzba~W4j2dVb=5yL4~zl3RdZ@7VR6)t
z=NA*U&IY<z=<sl`Ui_e=X@_yn?dnIZGjm=4N9FfRzz7I;qp{!uhrpV;SYKRDSm=xO
znPP{3HBEO3coVE!p)M7Y-mD*4MWgTuPy|R^^5mEx#L%FMkB`PDk0L-}@QK)XW~Qc;
zVo9C{1U$gt^D#{n5|^{&ifoPd6r}UJ^N(}ix$fL@{=PcW9P3B6%!j_WbLAl=6sD)!
ziFSHQ^gS9(qtVn*Z1!e~Qk|x{s|Hs``byr;m51tb@o{QOm8vwsI*N!53_dLsnh3>o
zs@n6mr_gsVeLvi<b>H4TcW?0Sr9Hc9JT;Z-O||#j&r9D|_8azF_Pm|7Pay60>?!-C
zJ!@y}ckM#&#u5QO=TR6U%4h;EAou*gZZ65&0zf9O0%d$py7`<enMT#uD)r30ApDZ{
zKe%uW-)|{;#sB~S24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007
zbV*G`2igo579AP%;|$OM00K@)L_t(I%Z-yeXjD-UhQB%Y-hKPnAV@-@h=gb%B530y
zASf0h2(i#c(bCRXN-Qkx6v0Lj1RF&VK^s9dU}53ANUY)`L5+`O_ilDK=bn4U;;tG*
zLw*=I{4oFdXZS}LJPM=NDV@4@WY@;t0Tfk001-N`3|<ujy!{r>PMkS;Nlsr*1)zWA
z#?}2>)}M&$E!Bk`|AL~GQeK`-eV=?Xe4sA`Si8D<eCqQoBC>dM25Gb{eXExDvgz>V
z5HNA0DPb-G1Oaw$?B(Iu<f1ADg-FXGKs|0Eg**Zr+SbqTzAf0qaqrc{|0kJGzz88g
zqtQa02jI%1*Njbl<I(seF7+s2L|9SEQEysuQ9wo-2s#4OGj&$2sDLU5xAt@C*dB&1
z+~M5NPO9YsaoaM`-NoqmM-E-QOFj&!w-X2r24LP=KF`#s&9!jO0nlt)1n8+&7`Zvh
zgEtclZs=o8waoNvOnt72pqT^lDc(WDIg*Y*d*0Gc9A9d4+<N?yLTK2#X&r$mHnE5p
z&@>Z3Q}CVer~=@e!>dPCAx#l{Cruvl9z;QXN5CtH1BA$AQ3#Dv&P5b+A^7w+ABcia
zvn8e;0gMctP0<t(O8JPcN|CR%Il7h=QH4)4G5IKDWx2qQMiZAR1QAR;-;p^m0VGMb
zyjDuH)dt|xcgwG9u+}nd?VlV(1tfLZ2%5A%h%tRQyObycq7nq6FYdh$0A+Ig9X$iv
zCCnQTi~LnAsEmvC>Fx8>r|)M!7MBUFxErV}%>foMQ>agV0+A96ZO3<91poj507*qo
IM6N<$f@;LJ#sB~S

diff --git a/docs/_static/rss-icon.png b/docs/_static/rss-icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..355d1c77a2f6e861a6394649be6365b314c67a84
GIT binary patch
literal 801
zc$@(t1K#|JP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60
z0RN!9r;`8x00(qQO+^RU2N4quElqJWyZ`_K!%0LzR5*=ol1*q_RTRg6=YG7-OhcR0
zyaBbHq>YL~HBhUSRMCZ^P~EsNU9^n|g$BAP+9E=6p)ULYw-Q$oR8S%msiI34f{@14
zel1$Dme4j#lNr%;CU4%m_qdoe7~<hx&RyK!;r~D92*9}`gRl0b>4!#4zcGjyL5v^*
zVu01Rps04*#X{po{lv~s{`^cXj1P`g@2yQ{i%qN(j5k;>7`Oh46^!i`?}RefX0MLP
z+{xW_T3NcGI>5#!N71D^Vg4d<{yfI&|H5J*bd*M2>&_*<U$YLjFQu~g0Cz%LP4aV7
z6u*6e#N~Bx$RbJErv?z?4YIsQcK$nxxmkz>Qt2ak;xOfdQ@Cx9u7is#q5+Zl_eRv_
z?KNKQ#!dL0`|yvwhLn0C7KEQaAisEe6%JV>HzkZ1FiuEnkFe>;DJn02jKBYB!liG>
zzur&0`70QQ-TNj~cdf!j7D2&?tTf3xOz&3Qj;BbTeVfwgmq<@a`0*I=`WY~e4KKV)
zq)d@TVy?uf7*-U}xI%X7D8<YqWd9(&1NfIdC01%IpMDFy-9Rc^NcM~ob0y@8Mld4X
z0-|l=%`=3V3G%7^=&eiO%lPNtCttcv>!%3-DtktW(GoflqW;H%75wlk_-9TcNtw>~
zZ=kIvX7g6ugD=vW{ua$Mq|}2O+)d0CRk{|$3N{_Wjl7O|U>~w;oZ_zr+00h}_=lb&
zwAy69PXmzDhKYruT?MGI0?SS4ECCP~uTf-?&Xr#PaMd9~uH?7o0I-{@#6m$u<@!61
z*Zc3bsThd<F0_0P*&nlnED*GW9~vPRur&Pxu6iFf-A=wRPy6y&l5IV8xiCIBHZZ(n
z(rIhWlH3_p$d%Ap8C#(%(xFn@LbGw>kN})Ly!~LcmVV@%trC$Kx}P+z&8T*d*ZSWJ
fi^m_Hxcd3O7Vc(}xUNP~00000NkvXXu0mjfDPw+e

diff --git a/docs/_static/twitter.png b/docs/_static/twitter.png
new file mode 100644
index 0000000000000000000000000000000000000000..0cda289fe33a4cb49630100066c842929173b51e
GIT binary patch
literal 216
zc%17D@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QU<L*T$r9IylHmNblJdl&R0hYC
z{G?O`&)mfH)S%SFl*+=BsWuD@459%(A+E+}{xht2@&Et-`iKA4eEf6g&mRT`hSz)v
zGZ`2d*h_-^g8zd7gOoS38v_G_o2QFoNX4z3^B1`eDDXI6{I=`Y|M_cfv-leHw+q~Q
zq4{#6;z?GC0FHprhC|uX^Xw%uoXu~E%Sip^%l2_J)7vle;5|Ph8^f|4jD~Yw70hE`
PU|{fc^>bP0l+XkKK7CHF

diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9fdGVtcGxhdGVzL2xheW91dC5odG1s
--- /dev/null
+++ b/docs/_templates/layout.html
@@ -0,0 +1,35 @@
+{% extends "!layout.html" %}
+
+{% block sidebartoc %}
+
+<style type="text/css">
+hr {
+  position: relative;
+  padding: 0;
+  margin: 8px auto;
+  border: none;
+  border-top: 1px solid #666666;
+  border-bottom: 1px solid #aaaaaa;
+  font-size: 1px;
+  line-height: 0;
+  overflow: visible;
+  width:85%
+}
+
+img {
+  vertical-align:middle
+}
+
+</style>
+
+<ul>
+    <li><img src="_static/rss-icon.png" alt="RSS icon" />&nbsp;<a href="http://www.gefira.pl/blog" title="Author's blog">Blog</a></li>
+    <li><img src="_static/twitter.png" alt="Twitter icon" />&nbsp;<a href="https://twitter.com/fourthrealm" title="Author on Twitter">Twitter</a></li>
+    <li><img src="_static/linkedin.png" alt="LinkedIn icon" />&nbsp;<a href="http://www.linkedin.com/groups?gid=3726448" title="Project's LinkedIn group">LinkedIn</a></li>
+</ul>
+
+<hr/>
+
+
+{% include "localtoc.html" %}
+{% endblock %}
diff --git a/docs/api.rst b/docs/api.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9hcGkucnN0
--- /dev/null
+++ b/docs/api.rst
@@ -0,0 +1,6 @@
+API Docs
+=================================
+
+.. automodule:: pymqi
+    :members:
+    :undoc-members:
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9jb25mLnB5
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,194 @@
+# -*- coding: utf-8 -*-
+#
+# PyMQI documentation build configuration file, created by
+# sphinx-quickstart on Tue Oct  6 13:12:00 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.append(os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ["sphinx.ext.autodoc"]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'PyMQI'
+copyright = u'2011, Dariusz Suchojad'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.3'
+# The full version, including alpha/beta/rc tags.
+release = '1.3'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'PyMQIdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'PyMQI.tex', u'PyMQI Documentation',
+   u'Dariusz Suchojad', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
diff --git a/docs/dco2patch b/docs/dco2patch
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9kY28ycGF0Y2g=
--- /dev/null
+++ b/docs/dco2patch
@@ -0,0 +1,106 @@
+diff -Naur src/dco2.c newsrc/dco2.c
+--- src/dco2.c	Thu Mar  7 15:13:33 2002
++++ newsrc/dco2.c	Thu Mar  7 15:12:47 2002
+@@ -177,6 +177,7 @@
+ 	OCIServer	*srvhp;			/* Server handle	*/
+ 	OCISession	*usrhp;			/* User handle		*/
+ 	OCISvcCtx	*svchp;			/* Service Context	*/
++        int             usingXA;                /* Using XA to connect */
+ } ServerContext;
+ 
+ staticforward PyTypeObject ServerContextType;
+@@ -447,6 +448,7 @@
+ 
+ static PyObject *RaiseOCIError1(dvoid *hp, ub4 handle_type, int setpy);
+ static PyObject *Connect(PyObject *self, PyObject *args);
++static PyObject *ConnectXA(PyObject *self, PyObject *args);
+ static void ServerContext_dealloc(ServerContext *self);
+ static PyObject *ServerContext_getattr(ServerContext *self, char *name);
+ static PyObject *ServerContext_cursor(ServerContext *self, PyObject *args);
+@@ -922,6 +924,8 @@
+ 		"allocate a LobLocator"},
+ 	{"connect", (PyCFunction) Connect, METH_VARARGS,
+ 		"connect to the database"},
++	{"connectXA", (PyCFunction) ConnectXA, METH_VARARGS,
++		"connect to the database using XA"},
+ 	{"TypeTable", (PyCFunction) TypeTable_lookup, METH_VARARGS,
+ 		"Type Table functions"},
+ 	{"Traceback", (PyCFunction) Traceback, METH_VARARGS,
+@@ -1237,6 +1241,7 @@
+ 	sc->svchp = NULL;
+ 	sc->srvhp = NULL;
+ 	sc->usrhp = NULL;
++	sc->usingXA = 0;
+ 
+ #ifdef COMMONENVIRONMENT
+ 	if (GLBenvs == 0) {
+@@ -1439,6 +1444,41 @@
+ 	return OBJECT(sc);
+ }
+ 
++
++/*
++ * Connect using TM XA Interface.
++ */
++#ifdef ORACLE8i 
++
++static PyObject *ConnectXA(PyObject *self, PyObject *args) {
++  char *database;
++  int databaselen;
++  ServerContext *sc;
++  
++  TRACE(T_ENTRY,("S","ConnectXA",database));
++  
++  if (!PyArg_ParseTuple(args, "s#", &database, &databaselen))
++    return NULL;
++  if (databaselen == 0) {
++    database = NULL;
++  }
++
++  if ((sc = PyObject_NEW(ServerContext, &ServerContextType)) == NULL)
++    return NULL;
++  
++  sc->envhp = xaoEnv(database);
++  OCIHandleAlloc(sc->envhp, (dvoid **)&sc->errhp, OCI_HTYPE_ERROR, 0, NULL);
++  sc->svchp = sc->svchp = xaoSvcCtx(database);
++  sc->usrhp = NULL;
++  sc->srvhp = NULL;
++  sc->usingXA = 1;
++  TRACE(T_EXIT,("sA","ConnectXA",sc));
++  return OBJECT(sc);
++}
++
++#endif
++
++
+ /*
+ ** ServerContext_dealloc
+ **
+@@ -1453,7 +1493,11 @@
+ 	char errbuf[OCI_ERROR_MAXMSG_SIZE];
+ 
+ 	TRACE(T_ENTRY, ("sA", "ServerContext_dealloc", self));
+-	
++
++	if (self->usingXA) {
++	  return;
++	}
++
+ 	/* End the session */
+ 
+ 	if (self->svchp) {
+diff -Naur DCOracle2/DCOracle2.py newDCOracle2/DCOracle2.py
+--- DCOracle2/DCOracle2.py	Thu Mar  7 15:14:07 2002
++++ newDCOracle2/DCOracle2.py	Thu Mar  7 15:13:12 2002
+@@ -119,6 +119,10 @@
+ 
+ Connect=connect     # For DCO 1 compatibility
+ 
++
++def connectXA(xaName = ''):
++    return connection(dco2.connectXA(xaName))
++
+ # NONAPI
+ def traceback(format=0):
+     """Generate a trace table list, either raw or formatted with newlines."""
+
diff --git a/docs/examples.rst b/docs/examples.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9leGFtcGxlcy5yc3Q=
--- /dev/null
+++ b/docs/examples.rst
@@ -0,0 +1,1173 @@
+Examples
+========
+
+The purpose of this section is to gather code showing PyMQI in action or code
+that's related to common WebSphere MQ-related tasks in general. Some of the
+examples are Python ports of IBM's examples that WebSphere MQ ships with.
+
+The samples are self-contained and ready to use in your own PyMQI applications.
+All contributions are very much welcome, see :doc:`here <support-consulting-contact>`
+for more informations. Don't hesitate to :doc:`send a question <support-consulting-contact>`
+if you'd like to see any specific example be added. Thanks!
+
+===============================
+Connecting in a client mode
+===============================
+
+Code::
+
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    qmgr.disconnect()
+
+Notes:
+
+* PyMQI :ref:`needs to be installed in client mode <download_build_install>` if you
+  want to connect in the client mode later on.
+
+===============================
+Connecting in bindings mode
+===============================
+
+Code::
+
+    import pymqi
+    
+    queue_manager = "QM01"
+    qmgr = pymqi.connect(queue_manager)
+    
+    qmgr.disconnect()
+
+Notes:
+
+* PyMQI :ref:`needs to be installed in server mode <download_build_install>` if you
+  want to connect in the MQ bindings mode later on.
+
+====================================
+How to put the message on a queue
+====================================
+
+Code::
+
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    queue = pymqi.Queue(qmgr, queue_name)
+    queue.put(message)
+    queue.close()
+    
+    qmgr.disconnect()
+
+====================================
+How to get the message off a queue
+====================================
+
+Code::
+
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    queue = pymqi.Queue(qmgr, queue_name)
+    message = queue.get()
+    queue.close()
+    
+    qmgr.disconnect()
+
+Notes:
+
+* By default Queue.get will not use any timeout, if messages are not available
+  immediately a pymqi.MQMIError will be raised with MQ reason code set to
+  2033 MQRC_NO_MSG_AVAILABLE, see :ref:`here <wait_single_message>`
+  and :ref:`here <wait_multiple_messages>` for info on how to wait for a single or multiple messages.
+
+.. _wait_single_message:
+
+====================================
+How to wait for a single message
+====================================
+
+Code::
+
+    import CMQC
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    conn_info = "%s(%s)" % (host, port)
+    
+    # Message Descriptor
+    md = pymqi.MD()
+    
+    # Get Message Options
+    gmo = pymqi.GMO()
+    gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+    gmo.WaitInterval = 5000 # 5 seconds
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    queue = pymqi.Queue(qmgr, queue_name)
+    message = queue.get(None, md, gmo)
+    queue.close()
+    
+    qmgr.disconnect()
+
+Notes:
+
+* If not told otherwise, Queue.get builds up a default Message Descriptor (MD) and
+  Get Message Options (GMO), however in this case one needs to specify custom
+  GMO in order to tell MQ to wait for messages for a given time. A default MD
+  still needs to be passed to Queue.get,
+
+* It is a recommended MQ programming practice to always use MQGMO_FAIL_IF_QUIESCING -
+  PyMQI uses it by default unless it's overridden.
+
+.. _wait_multiple_messages:
+
+====================================
+How to wait for multiple messages
+====================================
+
+Code::
+
+    import CMQC
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    conn_info = "%s(%s)" % (host, port)
+    
+    # Message Descriptor
+    md = pymqi.MD()
+    
+    # Get Message Options
+    gmo = pymqi.GMO()
+    gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+    gmo.WaitInterval = 5000 # 5 seconds
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    queue = pymqi.Queue(qmgr, queue_name)
+    
+    keep_running = True
+    
+    while keep_running:
+        try:
+            # Wait up to to gmo.WaitInterval for a new message.
+            message = queue.get(None, md, gmo)
+    
+            # Process the message here..
+    
+            # Reset the MsgId, CorrelId & GroupId so that we can reuse
+            # the same 'md' object again.
+            md.MsgId = CMQC.MQMI_NONE
+            md.CorrelId = CMQC.MQCI_NONE
+            md.GroupId = CMQC.MQGI_NONE
+    
+        except pymqi.MQMIError, e:
+            if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_NO_MSG_AVAILABLE:
+                # No messages, that's OK, we can ignore it.
+                pass
+            else:
+                # Some other error condition.
+                raise
+    
+    queue.close()
+    qmgr.disconnect()
+
+Notes:
+
+* The key part is a GIL-releasing non-busy loop which consumes almost no CPU and runs very
+  close to raw C speed. On modern-day hardware, such a programming pattern can
+  be used to easily achieve a throughput of thousands of messages a second,
+
+* Again, using CMQC.MQGMO_FAIL_IF_QUIESCING is a recommended programming practice.
+
+==========================================
+How to specify dynamic reply-to queues
+==========================================
+
+Code::
+
+    import CMQC
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    message = "Please reply to a dynamic queue, thanks."
+    dynamic_queue_prefix = "MY.REPLIES.*"
+    request_queue = "TEST.1"
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    # Dynamic queue's object descriptor.
+    dyn_od = pymqi.OD()
+    dyn_od.ObjectName = "SYSTEM.DEFAULT.MODEL.QUEUE"
+    dyn_od.DynamicQName = dynamic_queue_prefix
+    
+    # Open the dynamic queue.
+    dyn_input_open_options = CMQC.MQOO_INPUT_EXCLUSIVE
+    dyn_queue = pymqi.Queue(qmgr, dyn_od, dyn_input_open_options)
+    dyn_queue_name = dyn_od.ObjectName.strip()
+    
+    # Prepare a Message Descriptor for the request message.
+    md = pymqi.MD()
+    md.ReplyToQ = dyn_queue_name
+    
+    # Send the message.
+    queue = pymqi.Queue(qmgr, request_queue)
+    queue.put(message, md)
+    
+    # Get and process the response here..
+    
+    dyn_queue.close()
+    queue.close()
+    qmgr.disconnect()
+
+
+Notes:
+
+* To specify a dynamic reply-to queue, one needs to first create an appropriate
+  Object Descriptor and then open the queue, the descriptor's *DynamicQName*
+  attribute will be filled in by MQ to the name of a queue created,
+
+* Queue.put accepts a message descriptor on input, its *ReplyToQ* attribute is
+  responsible for storing information about where the responding side should
+  send the messages to.
+
+==========================================
+How to send responses to reply-to queues
+==========================================
+
+Code::
+
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Here's a reply"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    md = pymqi.MD()
+    
+    queue = pymqi.Queue(qmgr, queue_name)
+    message = queue.get(None, md)
+    
+    reply_to_queue_name = md.ReplyToQ.strip()
+    reply_to_queue = pymqi.Queue(qmgr, reply_to_queue_name)
+    reply_to_queue.put(message)
+    
+    queue.close()
+    qmgr.disconnect()
+
+Notes:
+
+* Queue.get accepts an input message descriptor parameter, its *ReplyToQ* attribute is
+  responsible for storing information about where the responding side should
+  send the messages to. The attribute's value is filled in by WebSphere MQ.
+
+
+==========================================
+How to publish messages on topics
+==========================================
+
+Code::
+
+    import pymqi, CMQC
+
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    topic_string = "/currency/rate/EUR/USD"
+    msg = "1.3961"
+    conn_info = "%s(%s)" % (host, port)
+
+    qmgr = pymqi.QueueManager(None)
+    qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+
+    topic = pymqi.Topic(qmgr, topic_string=topic_string)
+    topic.open(open_opts=CMQC.MQOO_OUTPUT)
+    topic.pub(msg)
+    topic.close()
+
+    qmgr.disconnect()
+
+Notes:
+
+* pymqi.Topic is a class through which all operations related to MQ topics are
+  made,
+* a Topic object may be open just like if it were a regular queue,
+* once a topic is open, its *.pub* method may be used for publishing the messages.
+
+=================================================================================
+How to subscribe to topics (and avoid MQRC_SUB_ALREADY_EXISTS at the same time)
+=================================================================================
+
+Code::
+
+    import logging
+
+    import pymqi, CMQC
+
+    logging.basicConfig(level=logging.INFO)
+
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    topic_string = "/currency/rate/EUR/USD"
+    msg = "1.3961"
+    conn_info = "%s(%s)" % (host, port)
+
+    qmgr = pymqi.QueueManager(None)
+    qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+
+    sub_desc = pymqi.SD()
+    sub_desc["Options"] = CMQC.MQSO_CREATE + CMQC.MQSO_RESUME + CMQC.MQSO_DURABLE + CMQC.MQSO_MANAGED
+    sub_desc.set_vs("SubName", "MySub")
+    sub_desc.set_vs("ObjectString", topic_string)
+
+    sub = pymqi.Subscription(qmgr)
+    sub.sub(sub_desc=sub_desc)
+
+    get_opts = pymqi.GMO(Options=CMQC.MQGMO_NO_SYNCPOINT + CMQC.MQGMO_FAIL_IF_QUIESCING + CMQC.MQGMO_WAIT)
+    get_opts["WaitInterval"] = 15000
+
+    data = sub.get(None, pymqi.md(), get_opts)
+    logging.info("Here's the received data: [%s]" % data)
+
+    sub.close(sub_close_options=CMQC.MQCO_KEEP_SUB, close_sub_queue=True)
+    qmgr.disconnect()
+
+Notes:
+
+* A *pymqi.Subscription* and its companion class *pymqi.SD* (a Subscription Descriptor) are
+  needed for subscribing to a topic,
+
+* a proper pymqi.SD needs to be created first; note the usage of its *.set_vs* method
+  for setting some of the object's properties. It's needed here because parts of
+  the pymqi.SD's implementation depend on `ctypes <http://docs.python.org/library/ctypes.html>`_
+  and cannot be set directly through the regular dictionary assignment like the "Options" have been set,
+
+* note well that among other options we're using CMQC.MQSO_CREATE + CMQC.MQSO_RESUME,
+  in plain words in means *create a new subscription of the name set in the
+  "SubName" key ("MySub" in the example) but if the subscribtion already exists
+  then just resume it*, this basically means we won't stumble upon the
+  MQRC_SUB_ALREADY_EXISTS error code,
+
+* once the pymqi.SD has been created, it can be used for subscribing to a particular
+  topic with invoking the pymqi.Subscription's *.sub* method,
+
+* once subscribed to the topic, you can use the subscription's *.get* method for
+  receiving the messages. Note that the .get method uses regular Get Message Options
+  (pymqi.GMO), just like if the subscription was an ordinary queue,
+
+* before disconnecting from the queue manager, a subscription should be closed;
+  note passing of the information regarding what MQ should do with the related objects.
+  
+.. _ssl_tls:
+
+==========================================
+How to use SSL & TLS
+==========================================
+
+Code::
+
+    import logging
+    
+    import pymqi
+    import CMQC
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    queue_manager = "QM01"
+    channel = "SSL.SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    conn_info = "%s(%s)" % (host, port)
+    ssl_cipher_spec = "TLS_RSA_WITH_AES_256_CBC_SHA"
+    key_repo_location = "/var/mqm/ssl-db/client/KeyringClient"
+    message = "Hello from Python!"
+    
+    cd = pymqi.CD()
+    cd.ChannelName = channel
+    cd.ConnectionName = conn_info
+    cd.ChannelType = CMQC.MQCHT_CLNTCONN
+    cd.TransportType = CMQC.MQXPT_TCP
+    cd.SSLCipherSpec = ssl_cipher_spec
+    
+    sco = pymqi.SCO()
+    sco.KeyRepository = key_repo_location
+    
+    qmgr = pymqi.QueueManager(None)
+    qmgr.connect_with_options(queue_manager, cd, sco)
+    
+    put_queue = pymqi.Queue(qmgr, queue_name)
+    put_queue.put(message)
+    
+    get_queue = pymqi.Queue(qmgr, queue_name)
+    logging.info("Here's the message again: [%s]" % get_queue.get())
+    
+    put_queue.close()
+    get_queue.close()
+    qmgr.disconnect()
+
+
+Notes:
+
+* When not using SSL or TLS, PyMQI creates a default *pymqi.CD* object however
+  in this case one needs to pass specific SSL/TLS-related information manually
+  using *pymqi.CD* and *pymqi.SCO* objects,
+
+* Code above assumes that:
+
+ * Queue manager has been assigned a key repository (SSLKEYR attribute) and
+   the repository contains the client's certificate,
+
+ * There is an SVRCONN channel with the following properties set::
+
+        DIS CHANNEL(SSL.SVRCONN.1) SSLCAUTH SSLCIPH
+             1 : DIS CHANNEL(SSL.SVRCONN.1) SSLCAUTH SSLCIPH
+        AMQ8414: Display Channel details.
+           CHANNEL(SSL.SVRCONN.1)                  CHLTYPE(SVRCONN)
+           SSLCAUTH(REQUIRED)
+           SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA)
+
+ * You can access a client key database of type CMS - one, which can be created with gsk6cmd/gsk7cmd tools -
+   and there are following files in the /var/mqm/ssl-db/client/ directory (the directory name may
+   be arbitrary, /var/mqm/ssl-db/client/ is only an example)::
+
+        $ ls -a /var/mqm/ssl-db/client/
+        .  ..  KeyringClient.crl  KeyringClient.kdb  KeyringClient.rdb	KeyringClient.sth
+        $
+
+ * The client key database contains a certificate labeled *ibmwebspheremqmy_user*
+   and you are running the code as an operating system's account *my_user*,
+
+ * The client key database contains the queue manager's certificate.
+
+* Remember to make sure that:
+
+ * The queue manager certificate's label is prefixed with *ibmwebspheremq* and ends with
+   the name of the queue manager, lowercased. If the name of a queue manager is
+   QM01 then the label will be *ibmwebspheremqqm01*,
+
+ * The client certificate's label is prefixed with *ibmwebspheremq* and ends with
+   the name of the operating system's account under which the code will be executed;
+   so if the account name is *user01* then the label will be *ibmwebspheremquser01*,
+
+ * The value of a cd.SSLCipherSpec parameter matches the value of a channel's
+   SSLCIPH attribute.
+
+==========================================
+How to set and get the message priority
+==========================================
+
+Code::
+
+    import logging
+    
+    import pymqi
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!"
+    conn_info = "%s(%s)" % (host, port)
+    priority = 2
+    
+    put_md = pymqi.MD()
+    put_md.Priority = priority
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    put_queue = pymqi.Queue(qmgr, queue_name)
+    put_queue.put(message, put_md)
+    
+    get_md = pymqi.MD()
+    get_queue = pymqi.Queue(qmgr, queue_name)
+    message_body = get_queue.get(None, get_md)
+    
+    logging.info("Received a message, priority [%s]." % get_md.Priority)
+    
+    put_queue.close()
+    get_queue.close()
+    qmgr.disconnect()
+
+
+Notes:
+
+* Use custom *pymqi.MD* instances for both setting and reading the message priority.
+
+==========================================
+How to use channel compression
+==========================================
+
+Code::
+
+    import pymqi
+    import CMQXC
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!" * 10000
+    conn_info = "%s(%s)" % (host, port)
+    
+    cd = pymqi.CD()
+    cd.MsgCompList[1] = CMQXC.MQCOMPRESS_ZLIBHIGH
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    queue = pymqi.Queue(qmgr, queue_name)
+    queue.put(message)
+    queue.close()
+    
+    qmgr.disconnect()
+
+Notes:
+
+    * Note that the compression level to use is the second element
+      of the cd.MsgCompList list, not the first one,
+
+    * The above assumes the channel's been configured using the following
+      MQSC command: *ALTER CHANNEL(SVRCONN.1) CHLTYPE(SVRCONN) COMPMSG(ZLIBHIGH)*
+
+=============================================
+How to check completion- and reason codes
+=============================================
+
+Code::
+
+    import logging
+    
+    import CMQC
+    import pymqi
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "foo.bar" # Note the made up host name
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    try:
+        qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    except pymqi.MQMIError, e:
+        if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_HOST_NOT_AVAILABLE:
+            logging.error("Such a host [%s] does not exist." % host)
+
+Notes:
+
+* When WebSphere MQ raises an exception, it is wrapped in a pymqi.MQMIError
+  object which exposes 2 useful attributes: *.comp* is a completion code
+  and *.reason* is the reason code assigned by MQ. All the completion- and
+  reason codes can be looked up in the *CMQC* module.
+
+===================================================================
+How to check the versions of WebSphere MQ packages installed, Linux
+===================================================================
+
+Code::
+
+    import logging
+    
+    import rpm
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    package_name = "MQSeriesClient"
+    
+    ts = rpm.TransactionSet()
+    mi = ts.dbMatch("name", package_name)
+    
+    if not mi.count():
+        logging.info("Did not find package [%s] in RPM database." % package_name)
+    else:
+        for header in mi:
+            version = header["version"]
+            msg = "Found package [%s], version [%s]." % (package_name, version)
+            logging.info(msg)
+
+Notes:
+
+* WebSphere MQ packages for Linux are distributed as RPMs and we can query the
+  RPM database for information about what's been installed,
+
+* PyMQI hasn't been used in the example, however the task is related to MQ
+  administration and that's why it's been shown here.
+
+=======================================================================
+How to check the versions of WebSphere MQ packages installed, Windows
+=======================================================================
+
+Code::
+
+    import logging
+    import _winreg
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    key_name = "Software\\IBM\\MQSeries\\CurrentVersion"
+    
+    try:
+        key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name)
+    except WindowsError:
+        logging.info("Could not find WebSphere MQ-related information in Windows registry.")
+    else:
+        version = _winreg.QueryValueEx(key, "VRMF")[0]
+        logging.info("WebSphere MQ version is [%s]." % version)
+
+
+* Versions of WebSphere MQ packages installed under Windows can be extracted
+  by querying the Windows registry,
+
+* Again, PyMQI hasn't been used in the example, however the task is related to MQ
+  administration and that's why it's been shown here.
+
+=======================================
+How to use an alternate user ID
+=======================================
+
+Code::
+
+    import pymqi
+    import CMQC
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!"
+    alternate_user_id = "myuser"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    od = pymqi.OD()
+    od.ObjectName = queue_name
+    od.AlternateUserId = alternate_user_id
+    
+    queue = pymqi.Queue(qmgr)
+    queue.open(od, CMQC.MQOO_OUTPUT | CMQC.MQOO_ALTERNATE_USER_AUTHORITY)
+    queue.put(message)
+    
+    queue.close()
+    qmgr.disconnect()
+
+
+Notes:
+
+* Queue.open accepts an object descriptor (an instance of pymqi.OD class) and
+  queue open options, both of which are used here to specify the alternate user ID.
+
+==============================================================================
+How to correlate request and response messages using CorrelationId
+==============================================================================
+
+(contributed by `Hannes Wagener <https://launchpad.net/~johannes-wagener>`_)
+
+Code::
+
+    # stdlib
+    import logging, threading, time, traceback, uuid
+
+    # PyMQI
+    import pymqi
+    import CMQC
+
+    logging.basicConfig(level=logging.INFO)
+
+    # Queue manager name
+    qm_name = "QM01"
+
+    # Listener host and port
+    listener = "192.168.1.135(1434)"
+
+    # Channel to transfer data through
+    channel = "SVRCONN.1"
+
+    # Request Queue
+    request_queue_name = "REQUEST.QUEUE.1"
+
+    # ReplyTo Queue
+    replyto_queue_name = "REPLYTO.QUEUE.1"
+
+    message_prefix = "Test Data. "
+
+    class Producer(threading.Thread):
+        """ A base class for any producer used in this example.
+        """
+        def __init__(self):
+            threading.Thread.__init__(self)
+            self.daemon = True
+
+            cd = pymqi.CD()
+            cd.ChannelName = channel
+            cd.ConnectionName = listener
+            cd.ChannelType = CMQC.MQCHT_CLNTCONN
+            cd.TransportType = CMQC.MQXPT_TCP
+            self.qm = pymqi.QueueManager(None)
+            self.qm.connect_with_options(qm_name, opts=CMQC.MQCNO_HANDLE_SHARE_NO_BLOCK,
+                                       cd=cd)
+
+            self.req_queue = pymqi.Queue(self.qm, request_queue_name)
+            self.replyto_queue = pymqi.Queue(self.qm, replyto_queue_name)
+
+
+    class RequestProducer(Producer):
+        """ Instances of this class produce an infinite stream of request messages
+        and wait for appropriate responses on reply-to queues.
+        """
+
+        def run(self):
+
+            while True:
+                # Put the request message.
+                put_mqmd = pymqi.MD()
+
+                # Set the MsgType to request.
+                put_mqmd["MsgType"] = CMQC.MQMT_REQUEST
+
+                # Set up the ReplyTo QUeue/Queue Manager (Queue Manager is automatically
+                # set by MQ).
+
+                put_mqmd["ReplyToQ"] = replyto_queue_name
+                put_mqmd["ReplyToQMgr"] = qm_name
+
+                # Set up the put options - must do with NO_SYNCPOINT so that the request
+                # message is committed immediately.
+                put_opts = pymqi.PMO(Options=CMQC.MQPMO_NO_SYNCPOINT + CMQC.MQPMO_FAIL_IF_QUIESCING)
+
+                # Create a random message.
+                message = message_prefix + uuid.uuid4().hex
+
+                self.req_queue.put(message, put_mqmd, put_opts)
+                logging.info("Put request message.  Message: [%s]" % message)
+
+                # Set up message descriptor for get.
+                get_mqmd = pymqi.MD()
+
+                # Set the get CorrelId to the put MsgId (which was set by MQ on the put1).
+                get_mqmd["CorrelId"] = put_mqmd["MsgId"]
+
+                # Set up the get options.
+                get_opts = pymqi.GMO(Options=CMQC.MQGMO_NO_SYNCPOINT +
+                                             CMQC.MQGMO_FAIL_IF_QUIESCING +
+                                             CMQC.MQGMO_WAIT)
+
+                # Version must be set to 2 to correlate.
+                get_opts["Version"] = CMQC.MQGMO_VERSION_2
+
+                # Tell MQ that we are matching on CorrelId.
+                get_opts["MatchOptions"] = CMQC.MQMO_MATCH_CORREL_ID
+
+                # Set the wait timeout of half a second.
+                get_opts["WaitInterval"] = 500
+
+                # Open the replyto queue and get response message,
+                replyto_queue = pymqi.Queue(self.qm, replyto_queue_name, CMQC.MQOO_INPUT_SHARED)
+                response_message = replyto_queue.get(None, get_mqmd, get_opts)
+
+                logging.info("Got response message [%s]" % response_message)
+
+                time.sleep(1)
+
+    class ResponseProducer(Producer):
+        """ Instances of this class wait for request messages and produce responses.
+        """
+
+        def run(self):
+
+            # Request message descriptor, will be reset after processing each
+            # request message.
+            request_md = pymqi.MD()
+
+            # Get Message Options
+            gmo = pymqi.GMO()
+            gmo.Options = CMQC.MQGMO_WAIT | CMQC.MQGMO_FAIL_IF_QUIESCING
+            gmo.WaitInterval = 500 # Half a second
+
+            queue = pymqi.Queue(self.qm, request_queue_name)
+
+            keep_running = True
+
+            while keep_running:
+                try:
+                    # Wait up to to gmo.WaitInterval for a new message.
+                    request_message = queue.get(None, request_md, gmo)
+
+                    # Create a response message descriptor with the CorrelId
+                    # set to the value of MsgId of the original request message.
+                    response_md = pymqi.MD()
+                    response_md.CorrelId = request_md.MsgId
+
+                    response_message = "Response to message %s" % request_message
+                    self.replyto_queue.put(response_message, response_md)
+
+                    # Reset the MsgId, CorrelId & GroupId so that we can reuse
+                    # the same 'md' object again.
+                    request_md.MsgId = CMQC.MQMI_NONE
+                    request_md.CorrelId = CMQC.MQCI_NONE
+                    request_md.GroupId = CMQC.MQGI_NONE
+
+                except pymqi.MQMIError, e:
+                    if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_NO_MSG_AVAILABLE:
+                        # No messages, that's OK, we can ignore it.
+                        pass
+                    else:
+                        # Some other error condition.
+                        raise
+
+    req = RequestProducer()
+    resp = ResponseProducer()
+
+    req.start()
+    resp.start()
+
+    try:
+        while True:
+            time.sleep(0.1)
+    except KeyboardInterrupt:
+        req.qm.disconnect()
+
+Notes:
+
+* The pattern of waiting for response messages by CorrelationId is very common
+  and a useful one,
+* Requesting application sends a message to the queue and uses the newly
+  created put message's MsgId as a parameter for receiving the responses, that is,
+  it expectes that in a given period of time there will be a message on the response
+  queue whose CorrelationId will be equal to MsgId,
+* Responding application receive the requests, copies the MsgId into CorrelationId
+  field and sends the response,
+* Requesting application receives the response because there was a message with
+  the expected CorrelationId.
+
+=======================================
+How to avoid MQRC_ALREADY_CONNECTED
+=======================================
+
+Code::
+
+    import CMQC, pymqi
+
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!"
+    conn_info = "%s(%s)" % (host, port)
+
+    cd = pymqi.CD()
+
+    cd.ChannelName = channel
+    cd.ConnectionName = conn_info
+    cd.ChannelType = CMQC.MQCHT_CLNTCONN
+    cd.TransportType = CMQC.MQXPT_TCP
+
+    connect_options = CMQC.MQCNO_HANDLE_SHARE_BLOCK
+
+    qmgr = pymqi.QueueManager(None)
+
+    for x in range(10):
+        qmgr.connect_with_options(queue_manager, cd=cd, opts=connect_options)
+        qmgr.connect_with_options(queue_manager, cd=cd, opts=connect_options)
+
+    queue = pymqi.Queue(qmgr, queue_name)
+    queue.put(message)
+    queue.close()
+
+    qmgr.disconnect()
+    
+::
+
+    import CMQC, pymqi
+
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    queue_name = "TEST.1"
+    message = "Hello from Python!"
+    conn_info = "%s(%s)" % (host, port)
+
+    qmgr = pymqi.QueueManager(None)
+    qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+
+    try:
+        qmgr.connect_tcp_client(queue_manager, pymqi.CD(), channel, conn_info)
+    except pymqi.MQMIError, e:
+        if e.comp == CMQC.MQCC_WARNING and e.reason == CMQC.MQRC_ALREADY_CONNECTED:
+            # Move along, nothing to see here..
+            pass
+
+    queue = pymqi.Queue(qmgr, queue_name)
+    queue.put(message)
+    queue.close()
+
+    qmgr.disconnect()
+
+Notes:
+
+* Two code snippets are copy'and'pastable answers to the question but a discussion
+  is in order,
+
+* The first snippet is the recommended way, it tells MQ to reuse a single connection
+  regardless of how many times the application will be issuing a request for
+  establishing a new connection. That's also a pattern to use when your application
+  is multithreaded, without using MQCNO_HANDLE_SHARE_BLOCK MQ would not allow
+  the threads to reuse the same connection,
+
+* The second one shows how to ignore the particular exception indicating that
+  an application has been already connected.
+
+=======================================
+How to define a channel
+=======================================
+
+Code::
+
+    import pymqi
+    import CMQC, CMQXC, CMQCFC
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    channel_name = "MYCHANNEL.1"
+    channel_type = CMQXC.MQCHT_SVRCONN
+    
+    args = {CMQCFC.MQCACH_CHANNEL_NAME: channel_name,
+            CMQCFC.MQIACH_CHANNEL_TYPE: channel_type}
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    pcf = pymqi.PCFExecute(qmgr)
+    pcf.MQCMD_CREATE_CHANNEL(args)
+    
+    qmgr.disconnect()
+
+Notes:
+
+* Instances of *pymqi.PCFExecute* class have direct access to all PCF
+  administrative MQ commands. The commands expect a dictionary of parameters
+  describing the properties of MQ objects which need to be manipulated. All commands
+  and appropriate parameters may be loooked up in modules *CMQC*, *CMQXC* and *CMQCFC*,
+
+* The code above is equivalent to following MQSC command:
+  *DEFINE CHANNEL(MYCHANNEL.1) CHLTYPE(SVRCONN)*.
+
+=======================================
+How to define a queue
+=======================================
+
+Code::
+
+    import pymqi
+    import CMQC
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    queue_name = "MYQUEUE.1"
+    queue_type = CMQC.MQQT_LOCAL
+    max_depth = 123456
+    
+    args = {CMQC.MQCA_Q_NAME: queue_name,
+            CMQC.MQIA_Q_TYPE: queue_type,
+            CMQC.MQIA_MAX_Q_DEPTH: max_depth}
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    pcf = pymqi.PCFExecute(qmgr)
+    pcf.MQCMD_CREATE_Q(args)
+    
+    qmgr.disconnect()
+
+Notes:
+
+* Instances of *pymqi.PCFExecute* class have direct access to all PCF
+  administrative MQ commands. The commands expect a dictionary of parameters
+  describing the properties of MQ objects which need to be manipulated. All commands
+  and appropriate parameters may be loooked up in modules *CMQC*, *CMQXC* and *CMQCFC*,
+
+* The code above is equivalent to following MQSC command:
+  *DEFINE QLOCAL(MYQUEUE.1) MAXDEPTH(123456)*.
+
+=======================================
+How to display channels
+=======================================
+
+Code::
+
+    import logging
+    
+    import pymqi
+    import CMQC, CMQCFC
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    prefix = "SYSTEM.*"
+    
+    args = {CMQCFC.MQCACH_CHANNEL_NAME: prefix}
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    pcf = pymqi.PCFExecute(qmgr)
+    
+    try:
+        response = pcf.MQCMD_INQUIRE_CHANNEL(args)
+    except pymqi.MQMIError, e:
+        if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_UNKNOWN_OBJECT_NAME:
+            logging.info("No channels matched prefix [%s]" % prefix)
+        else:
+            raise
+    else:
+        for channel_info in response:
+            channel_name = channel_info[CMQCFC.MQCACH_CHANNEL_NAME]
+            logging.info("Found channel [%s]" % channel_name)
+    
+    qmgr.disconnect()
+
+
+Notes:
+
+* PCF calls that read MQ objects' definition or status, and MQCMD_INQUIRE_CHANNEL
+  among them, return a list of dictionaries, items of which describe the particular
+  objects queried for.
+
+* The code above is equivalent to following MQSC command:
+  *DIS CHANNEL(SYSTEM.\*)*.
+
+=======================================
+How to display queues
+=======================================
+
+Code::
+
+    import logging
+    
+    import pymqi
+    import CMQC, CMQCFC, CMQXC
+    
+    logging.basicConfig(level=logging.INFO)
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    prefix = "SYSTEM.*"
+    queue_type = CMQC.MQQT_MODEL
+    
+    args = {CMQC.MQCA_Q_NAME: prefix,
+            CMQC.MQIA_Q_TYPE: queue_type}
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    pcf = pymqi.PCFExecute(qmgr)
+    
+    try:
+        response = pcf.MQCMD_INQUIRE_Q(args)
+    except pymqi.MQMIError, e:
+        if e.comp == CMQC.MQCC_FAILED and e.reason == CMQC.MQRC_UNKNOWN_OBJECT_NAME:
+            logging.info("No queues matched given arguments.")
+        else:
+            raise
+    else:
+        for queue_info in response:
+            queue_name = queue_info[CMQC.MQCA_Q_NAME]
+            logging.info("Found queue [%s]" % queue_name)
+    
+    qmgr.disconnect()
+
+Notes:
+
+* PCF inquiries, MQCMD_INQUIRE_Q including, return a list of dictionaries,
+  items of which describe the particular objects queried for.
+
+* The code above is equivalent to following MQSC command:
+  *DIS QMODEL(SYSTEM.\*)*.
+
+=======================================
+How to ping the queue manager
+=======================================
+
+Code::
+
+    import pymqi
+    import CMQC, CMQCFC, CMQXC
+    
+    queue_manager = "QM01"
+    channel = "SVRCONN.1"
+    host = "192.168.1.135"
+    port = "1434"
+    conn_info = "%s(%s)" % (host, port)
+    
+    qmgr = pymqi.connect(queue_manager, channel, conn_info)
+    
+    pcf = pymqi.PCFExecute(qmgr)
+    pcf.MQCMD_PING_Q_MGR()
+    
+    qmgr.disconnect()
+
+Notes:
+
+* Not all PCF commands require input parameters, MQCMD_PING_Q_MGR is one such an
+  argument-less command.
\ No newline at end of file
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9pbmRleC5yc3Q=
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,513 @@
+.. PyMQI documentation master file, created by
+   sphinx-quickstart on Tue Oct  6 13:12:00 2009.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+PyMQI 1.3 Documentation
+=================================
+
+Other sections:
+
+.. toctree::
+   :maxdepth: 1
+
+   Support, consulting and contact <support-consulting-contact>
+   Examples <examples>
+   Notes on building PyMQI on Windows <mingw32>
+   API Docs <api>
+
+=================
+Introduction
+=================
+
+PyMQI is a production-ready Python extension for IBM's messaging & queueing middleware,
+WebSphere MQ (formerly know as MQSeries). This allows Python programs to make
+calls directly to MQI to connect queues and get/put messages on them etc.
+
+PyMQI combines the power of Python with the benefits of the messaging model.
+It can be used to develop test harnesses for MQ based systems, for rapid
+prototyping of MQ applications, for development of administrative GUIs
+or for mainstream MQ application development!
+
+PyMQI does not replace MQI, but is layered on top of it, so you must have
+MQ (either client or server) installed before you can use PyMQI.
+
+PyMQI has been used in production environments for several years on
+Linux, Windows, Solaris and AIX with queue managers running on Linux,
+Windows, Solarix, AIX, HP-UX and z/OS mainframe. Supported WebSphere MQ versions are
+5.x, 6.x and 7.x.
+
+PyMQI consists of several modules that are used together:
+
+    * CMQC, CMQXC, CMQCFC, CMQZC define all the constants for MQI.
+    * pymqe a low-level Python extension interface to MQI, written in C.
+    * pymqi a high-level Python OO interface to MQI that uses pymqe.
+
+It's easiest to use the pymqi package. Here is some minimal code to put a message on a queue::
+
+    import pymqi
+
+    qmgr = pymqi.connect('QM.1', 'SVRCONN.CHANNEL.1', '192.168.1.121(1434)')
+
+    putq = pymqi.Queue(qmgr, 'TESTQ.1')
+    putq.put('Hello from Python!')
+
+And here's some more to get it again::
+
+    import pymqi
+
+    qmgr = pymqi.connect('QM.1', 'SVRCONN.CHANNEL.1', '192.168.1.121(1434)')
+
+    getq = pymqi.Queue(qmgr, 'TESTQ.1')
+    print("Here's the message:", getq.get())
+
+Easy, eh?
+
+For the MQI calls that PyMQI supports, the full set of options are implemented.
+This allows you access to the full functionality of the MQI call from Python.
+PyMQI defines classes that are synonymous with the MQI structure parameters,
+such as MQGMO, MQPMO etc. This lets you program MQI 'the Python way'.
+
+.. _download_build_install:
+
+=========================
+Download, build & install
+=========================
+
+Automated install using pip
+---------------------------
+
+On Linux and UNIX one can use `pip <http://pypi.python.org/pypi/pip>`_
+- PyMQI is a Python package and as such can be installed 
+using pip, which is a specialized installer for Python applications. pip will 
+connect to PyPI which is a central repository of Python packages, available 
+at http://pypi.python.org/pypi and will then look up PyMQI, download it 
+from http://pypi.python.org/pypi/pymqi and install it locally on your system.
+
+First you need to install pip itself.
+
+On most Linux systems the package pip is in is called 'pip' or 'pip-python'
+so - depending on your distribution - you can simply issue one of the commands 
+below to get it installed::
+  
+  $ sudo apt-get install pip
+  # yum install pip
+  # zypper in python-pip
+  
+Assuming you have root power, you can now install PyMQI system-wide using the 
+command below - again, adjust the 'pip' command name for your particular system,
+it usually is 'pip' can be 'pip-python' sometimes::
+
+  $ sudo pip install pymqi
+  
+Or, if you don't have root access, you can install PyMQI for a particular user
+only (this will be installed to $HOME/.local)::
+
+  $ pip install --user pymqi
+
+  
+Windows
+-------
+
+`Download one of the precompiled package here <https://launchpad.net/pymqi/+download>`_
+
+Compiling from source
+---------------------
+`Download the latest version here <https://launchpad.net/pymqi/+download>`_.
+The download package is a source
+distribution with a Distutils setup.py file. Download, unzip & untar the
+file, then cd into the pymqi directory. Note that compiling from source needs access
+to Python development headers - such as Python.h - on Linux it means you first
+need to install the development DEB or RPM package, typically called *python-dev*
+or similarly.
+
+PyMQI may be built in both client and server mode. The client mode requires one
+to connect to queue managers through a SVRCONN MQ channel. The server mode allows
+for connecting in MQ bindings mode. **If you're unsure which one to choose, build PyMQI
+in a client mode**.
+
+Here's the step of actions for building and installing an MQI PyMQI client::
+
+    $ python setup.py build client
+    $ python setup.py install
+
+And here's how to build and install PyMQI in a server mode::
+
+    $ python setup.py build server
+    $ python setup.py install
+
+If you are building PyMQI on Windows and you don't have MSVC installed,
+you can use MinGW instead. Jaco Smuts has written notes `here <mingw32.html>`_ explaining
+how itis done.
+
+`See this StackOverflow post if you're compiling on AIX 
+<http://stackoverflow.com/questions/5376514/how-do-i-force-python-pymqi-1-2-to-use-my-gcc-compiler-when-i-build-it>`_ 
+and would like to force PyMQI to use GCC instead of cc_r.
+
+If you port PyMQI to other platforms, `please let me know <support-consulting-contact.html>`_.
+
+=========================
+Supported Functionality
+=========================
+
+The following MQI calls are supported.
+
+    * MQCONN, MQDISC
+    * MQCONNX
+    * MQOPEN/MQCLOSE
+    * MQPUT/MQPUT1/MQGET
+    * MQCMIT/MQBACK
+    * MQBEGIN
+    * MQINQ
+    * MQSET
+    * MQSUB
+    * MQCRTMH
+    * MQSETMP
+    * MQINQMP
+    * And various MQAI PCF commands.
+
+In support of these, PyMQI implements the following structures. Others
+will follow to support additional MQI calls as required.
+
+    * MQCD
+    * MQCMHO
+    * MQMD
+    * MQGMO
+    * MQIMPO
+    * MQOD
+    * MQPD
+    * MQPMO
+    * MQRFH2
+    * MQSCO
+    * MQSMPO
+    * MQSRO
+    * MQSD
+    * MQTM
+    * MQTMC2
+
+For a client build, pymqi.__mqbuild__ is set to the string 'client',
+otherwise it is set to 'server'. The supported command levels
+(from 5.0 onwards) for the version of MQI linked with PyMQI are available
+in the tuple pymqi.__mqlevels__. To determine if a particular level is
+supported, do something like::
+
+
+        if '7.0' in pymqi.__mqlevels__:
+            print('New MQI things to try!')
+
+===========
+Platforms
+===========
+
+PyMQI is known to work on Linux, Windows, Solaris and AIX.  It ought to build
+& work on any 32-bit or 64-bit platform that supports MQI & Python. It has been
+used with queue managers running on Linux, Windows, Solaris, AIX, HP-UX and z/OS
+mainframe.
+
+If you port PyMQI to other platforms and would like to contribute your
+changes, `please contact the author <support-consulting-contact.html>`_.
+
+===============
+PCF Interface
+===============
+
+PyMQI supports Programmable Command Format (PCF) if built with MQ version
+5.3 or newer. This allows you to easily administer and configure MQ. The full set
+of PCF commands is available.
+
+To use PCF with PyMQI, instantiate a PFCExecute passing it a QueueManager object.
+Then call a PCF command, passing a dictionary of attributes
+and values, as appropriate to the command. Commands and attributes are as
+defined by IBM in cmqc.h, cmqcfc.h, and in their documentation.
+
+You can also use PCF to query a queue manager. In this case, PCFExecute
+returns a list of dictionaries, with the attributes and values you have
+requested.
+
+An example PCFExecute usage is given below::
+
+        import pymqi, CMQC
+        from CMQCFC import *
+
+        qmgr = pymqi.connect('QM.1', 'SVRCONN.CHANNEL.1', '192.168.1.121(1434)')
+        pcf = pymqi.PCFExecute(qmgr)
+
+        # Ping the queue manager
+        pcf.MQCMD_PING_Q_MGR()
+
+        # Create a channel "SVRCONN.CHANNEL.2"
+        chanArgs = {MQCACH_CHANNEL_NAME : "SVRCONN.CHANNEL.2",
+                    MQIACH_CHANNEL_TYPE : CMQC.MQCHT_RECEIVER}
+        pcf.MQCMD_CREATE_CHANNEL(chanArgs)
+
+        # Query all queues beginning with "TESTQ"
+        queues = pcf.MQCMD_INQUIRE_Q({CMQC.MQCA_Q_NAME : "TESTQ*"})
+        for q in queues:
+            print(pcf.stringify_keys(q))
+
+======================================================
+MQBEGIN, Distributed Transactions, XA and all that
+======================================================
+
+The use of QueueManager.begin() allows a PyMQI application to coordinate
+distributed transactions. This means that updates to queues & databases
+(or anything else supported by the XA interface) are linked. If a queue
+get/put fails, any database updates within the transaction are backed out.
+Similarly, if a database update fails, any queue get/put operations within
+the transaction are undone.
+
+This depends on the MQ Transaction Manager, which in turn coordinates
+resources through the XA interface. To make this work from Python, you must
+use an XA enabled database API. The only one I'm aware of that works is
+DCOracle2. You will need to apply `these (unofficial) patches <dco2patch>`_.
+
+You will also have to configure the Queue Manager with XA information for
+the resources you want it to coordinate. See the MQSeries System
+Administration book for more details.
+
+You might also be interested in a Python extension for the XA Switch
+interface. This lets Python applications participate directly in the Distributed
+Transaction two phase commit protocol. `See here <pyxasw.tar.gz>`_ for more details.
+Pyxasw & PyMQI are related but independent of each other.
+
+This code fragment shows a transactional MQ put & DCO2 database insert,
+coordinated by MQ::
+
+
+        import pymqi, DCOracle2
+
+        qmgr = pymqi.QueueManager()
+        q = pymqi.Queue(qmgr, 'TESTQ1')
+        pmo = pymqi.PMO(Options = CMQC.MQPMO_SYNCPOINT)
+        md = pymqi.MD()
+
+        # Begin a global transaction
+        qm.begin()
+
+        # Connect a XA managed database
+        conn=DCOracle2.connectXA()
+        curs = conn.cursor()
+
+        # Do a transactional put & db insert
+        q.put('TM comes to Linux!', md, pmo)
+        curs.execute("INSERT INTO TESTTABLE VALUES(42, 'Lala')")
+
+        # Now commit the transaction
+        qmgr.commit()
+
+
+================
+Inquire & Set
+================
+PyMQI supports a simple yet powerful interface to the MQI MQINQ & MQSET calls.
+
+The QueueManager.inquire() and Queue.inquire() calls allow you to inquire
+on a single MQ attribute. An integer or string attribute value is returned,
+as appropriate.
+
+The Queue.set() call lets you set a single Queue attribute. The value passed
+must be of the appropriate type.
+
+When inquiring or setting on a queue, the queue must be specifically opened
+for inquire or set. The operations cannot be mixed on a queue, neither can
+a get/put queue be used for inquire or set. No such restriction applies to
+QueueManager objects.
+
+An example inquire is shown below::
+
+
+    import pymqi, CMQC
+
+    qmgr = pymqi.connect('QM.1', 'SVRCONN.CHANNEL.1', '192.168.1.121(1434)')
+
+    q = pymqi.Queue(qmgr, 'TESTQ.1')
+
+    print('Queue depth:', q.inquire(CMQC.MQIA_CURRENT_Q_DEPTH))
+    print('Queue Manager platform:', qmgr.inquire(CMQC.MQIA_PLATFORM))
+
+================
+SSL & TLS
+================
+
+PyMQI supports encrypted SSL & TLS connections right out of the box,
+see :ref:`here <ssl_tls>` for the usage example.
+
+==========================
+PEP-8 API transition plan
+==========================
+
+Starting with PyMQI 1.2, the API will be transitioned towards the
+`PEP-8 <http://www.python.org/dev/peps/pep-0008/>`_ compliance.
+If you're new to PyMQI and have never used versions older than 1.2 then you have
+absolutely nothing to do on your end. If however there's already some code of yours
+that has been written using the pre-1.2 API then read on.
+
+Using the Python's built-in facilities, some of the classes and methods will be
+gradually declared deprecated and you'll be encouraged to use new names instead
+of the old ones.
+
+The affected API has been listed below:
+
+=======================================  ========================================
+PyMQI < 1.2                              PyMQI 1.2+
+=======================================  ========================================
+pymqi.gmo                                pymqi.GMO
+pymqi.pmo                                pymqi.PMO
+pymqi.od                                 pymqi.OD
+pymqi.md                                 pymqi.MD
+pymqi.cd                                 pymqi.CD
+pymqi.sco                                pymqi.SCO
+pymqi.QueueManager.connectWithOptions    pymqi.QueueManager.connect_with_options
+pymqi.QueueManager.connectTCPClient      pymqi.QueueManager.connect_tcp_client
+pymqi.QueueManager.getHandle             pymqi.QueueManager.get_handle
+pymqi.PCFExecute.stringifyKeys           pymqi.PCFExecute.stringify_keys
+=======================================  ========================================
+
+How does it work precisely?
+
+=======================================  ========================================
+Planned date                             Planned action
+=======================================  ========================================
+March 2011                               The PEP-8 compliant API has been introduced and it's been aliased to the old one, there's no difference in using either one however you're *strongly* encouraged to use only the new one in new code. (*done in PyMQI 1.2*)
+October 2012                             Using the old API will issue a `PendingDeprecationWarning <http://docs.python.org/library/exceptions.html#exceptions.PendingDeprecationWarning>`_  in run-time
+March 2014                               Using the old API will issue a `DeprecationWarning <http://docs.python.org/library/exceptions.html#exceptions.DeprecationWarning>`_  in run-time
+October 2015                             Using the old API will raise a run-time exception making it effectively impossible to use the old API
+=======================================  ========================================
+
+In short, the old API will work until October 2015 but given the idea of issuing
+warnings, you'd be better off preparing for the new API as soon as possible.
+
+============
+Uninstalling
+============
+
+Uninstalling PyMQI is a matter of removing the files on disk, for instance,
+under Ubuntu, when using Python 2.6, the following commands may be used::
+
+    $ sudo rm /usr/local/lib/python2.6/dist-packages/CMQ*.py*
+    $ sudo rm /usr/local/lib/python2.6/dist-packages/pymq*.*
+
+That is, all PyMQI-related files always match one of the patterns, either CMQ*.py*
+or pymq*.*
+
+==========
+FAQ
+==========
+1. Why can't I connect PyMQI to the queue manager?
+
+    If you see this error::
+
+        pymqi.MQMIError: MQI Error. Comp: 2, Reason 2058: FAILED: MQRC_Q_MGR_NAME_ERROR
+
+    And you're certain the queue manager is running, then you're probably
+    running in an MQ client environment without telling PyMQI where the server is.
+    If you don't know the difference between an MQ client and server, please read
+    the IBM documentation.
+
+    The answer is to either:
+
+    Set the MQSERVER environment variable to something like "SYSTEM.DEF.SVRCONN/TCP/192.168.1.24(1414)" (or whatever your MQ Server channel/address is).
+
+    Pass in all the connection options to *pymqi.connect*, as in::
+
+        qmgr = pymqi.connect('test.queue.manager', 'SYSTEM.DEF.SVRCONN', '192.168.1.24(1414)'))
+
+    If it still doesn't work, then you've probably built PyMQI against
+    the MQ server library rather than the client.
+
+===================
+Caveats
+===================
+
+    * If a MQI message is truncated, a .get call will raise an exception and you
+      will not be able to access the partially received message. This is bad news
+      if you're using MQGMO_ACCEPT_TRUNCATED_MSG, as the message will be lost for
+      good. The workaround is to let PyMQI allocate the buffer for you, or specify
+      a big enough buffer, or stop accepting truncated messages. The latter options
+      don't work too well, as you can't find out how big the actual message is!
+
+    * PyMQI unpacks the the MsgId and CorrelId fields of the MQMD structure as a
+      '24s', regardless of what you put in it. This leads to some asymmetry when
+      sending integers with these field. e.g., On the put side::
+
+              md.MsgId = struct.pack('l', 42)
+
+      And on the get side::
+
+              msgId = struct.upack('l', md.MsgId[0:4])[0]
+
+
+===============
+Sample code
+===============
+
+See :doc:`here <examples>` for sample code and examples.
+
+=====================
+More documentation
+=====================
+The author's blog:
+
+    * `WebSphere MQ Administration with Python. Part I – introducing PCFExecute <http://www.gefira.pl/blog/2011/03/10/websphere-mq-administration-with-python-part-i-introducing-pcfexecute/>`_ (March 10th, 2011)
+    * `Message browsing with WebSphere MQ and PyMQI <http://www.gefira.pl/blog/2011/02/21/message-browsing-with-websphere-mq-and-pymqi/>`_ (February 21st, 2011)
+    * `A quick intro to WebSphere MQ & Python programming <http://www.gefira.pl/blog/2011/01/31/a-quick-intro-to-websphere-mq-python-programming/>`_ (January 31st, 2011)
+    * `PyMQI 1.2 is coming soon <http://www.gefira.pl/blog/2010/12/03/pymqi-1-2-is-coming-soon/>`_ (December 3rd, 2010)
+    * `PyMQI 1.0 – Python i WebSphere MQ <http://www.gefira.pl/blog/2009/12/05/pymqi-1-0-python-i-websphere-mq/>`_ (Polish only,  December 5th, 2009)
+
+Other documentation:
+
+    * `Installing PyMQI 1.2 on CentOS 5.5 <http://nsupathy.wordpress.com/2011/03/22/installing-pymqi1-2-on-centos-5-5/>`_ at Umapathy's Blog (March 22, 2011)
+    * Sami Salkosuo of IBM has written `a developerWorks article about PyMQI here <http://www.ibm.com/developerworks/websphere/library/techarticles/0708_salkosuo/0708_salkosuo.html>`_. It gives a good overview and includes several good example applications (August 29th, 2007)
+    * PyMQI has plenty of doc strings. They're `reproduced here <api.html>`_ for convenience.
+
+
+======================
+Acknowledgments
+======================
+
+**Les Smithson** is the original author and maintainer of PyMQI. Les is available
+for Python, MQ, Linux/Unix & C/C++ consulting assignments.
+`See here for his CV and more details <http://www.open-networks.co.uk>`_.
+
+Thanks to the following (in no particular order) for their code, suggestions,
+ports, bug-fixes etc.
+
+    * Pascal Gauthier
+    * John Kittel
+    * Yves Lepage
+    * John OSullivan
+    * Tim Couper
+    * Maas-Maarten Zeeman
+    * Rich LaMarche
+    * Kevin Kalbfleisch
+    * Mauricio Strello
+    * Brian Vicente
+    * Jaco Smuts
+    * Brent S. Elmer, Ph.D.
+    * Hannes Wagener
+    * Andy Piper
+
+================
+Related projects
+================
+
+    * `Spring Python <http://springpython.webfactional.com/>`_ uses PyMQI in `its implementation of JMS <http://static.springsource.org/spring-python/1.2.x/sphinx/html/jms.html>`_. If you need to seamingly exchange messages
+      between Python and Java MQ applications then Spring Python is the project to use as it brings
+      the world of JMS WebSphere MQ programming to Python.
+
+================
+Disclaimer
+================
+
+You are free to use this code in any way you like, subject to the Python
+& IBM disclaimers & copyrights. I make no representations about the suitability
+of this software for any purpose. It is provided "AS-IS" without warranty
+of any kind, either express or implied. So there.
+
+===============
+Donate
+===============
+.. image:: http://images.sourceforge.net/images/project-support.jpg
+
+`Donate to PyMQI <http://sourceforge.net/donate/index.php?group_id=12210>`_
+
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9tYWtlLmJhdA==
--- /dev/null
+++ b/docs/make.bat
@@ -0,0 +1,113 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+set SPHINXBUILD=sphinx-build
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html      to make standalone HTML files
+	echo.  dirhtml   to make HTML files named index.html in directories
+	echo.  pickle    to make pickle files
+	echo.  json      to make JSON files
+	echo.  htmlhelp  to make HTML files and a HTML help project
+	echo.  qthelp    to make HTML files and a qthelp project
+	echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  changes   to make an overview over all changed/added/deprecated items
+	echo.  linkcheck to check all external links for integrity
+	echo.  doctest   to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PyMQI.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PyMQI.ghc
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+:end
diff --git a/docs/mingw32.rst b/docs/mingw32.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9taW5ndzMyLnJzdA==
--- /dev/null
+++ b/docs/mingw32.rst
@@ -0,0 +1,98 @@
+Mingw32
+=================================
+
+How To Build Python Extensions Without a Microsoft Compiler
+-----------------------------------------------------------
+
+
+These note were written by Jaco Smuts. If you have any questions about them, please e-mail Jaco `directly <jaco.smuts@clover.co.za>`_.
+
+Notes on how to compile Python extensions on windows without the Microsoft compiler. I assume some basic skills in Windows. Most of this is simply copied from http://sebsauvage.net/python/mingw.html.
+
+Steps:
+
+   #. Get and install MinGW gcc
+   #. Create libpython2?.a
+   #. Tweak distutils
+   #. Compile/install the extension with distutils.
+
+Get and install MinGW gcc
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Get MinGW gcc from http://mingw.org (Minimalist GNU For Windows). I've only
+downloaded MinGW-3.1.0-1.exe (14.8 Mb). This will install the compiler,
+libraries and support utilities in your chosen directory. I can't remember
+if I had to do this manually, make sure your {install dir}\\bin is added to
+your path environment variable. To test it type gcc -- version in at the
+command prompt to test your installation.
+
+Create libpython2?.a
+~~~~~~~~~~~~~~~~~~~~
+To create Python extensions, you need to link against the Python library.
+Unfortunately, most Python distributions are provided with Python2?.lib,
+a library in Microsoft Visual C++ format. GCC expects a .a file (libpython2?.a
+to be precise.). Here's how to convert python2?.lib to libpython2?.a:
+
+   1. Download pexports from http://starship.python.net/crew/kernr/mingw32/.
+   2. Extract files and make sure the bin directory is in your path.
+   3. Locate Python2?.dll (Found mine under C:\\WINNT\\system32).
+   4. Run::
+
+          pexports python2?.dll > python2?.def 
+
+      This will extract all symbols from python2?.dll and write them into python2?.def.
+   5. Run::
+           
+          dlltool --dllname python2?.dll --def python2?.def --output-lib libpython2?.a
+
+      This will create libpython2?.a (dlltool is part of MinGW utilities).
+   6. Copy libpython2?.a to {your install}\\python2?\\libs\\ (in the same directory
+      as python22.lib). This trick should work for all Python versions,
+      including future releases of Python. You can also use this trick to
+      convert other libraries. (Will see about that soon) 
+
+Tweak Distutils
+~~~~~~~~~~~~~~~
+From memory, this was not required for my python 2.3 version, I include this
+for the sake of completeness.
+
+You can compile and link your Python extensions yourself, but distutil is
+the preffered way (it will make all the necessary calls to the different
+compilers, call SWIG if necessary and your extensions will be easier to
+distribute). Locate build_ext.py in your Python directory (should be somewhere
+around C:\\Python22\\Lib\\distutils\\command\\). Change the 2 following lines::
+
+     
+    #new_sources.append(base + target_ext) # old
+    new_sources.append(base + '_wrap' + target_ext) # new
+    
+    #swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] # old
+    swig_cmd = [swig, "-python"] # new
+
+Compile/install the extension with distutils
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+This is how I compiled the pymqi extension..
+
+There seems to be a problem doing the install with the build in one go,
+so I first build then I install without building In the setup.py file I
+changed the include_dirs to::
+     
+    C:/Program Files/IBM/WebSphere MQ/Tools/c/include
+
+Library_dirs to::
+
+    C:/Program Files/IBM/WebSphere MQ/Tools/Lib
+
+(note the forward slashes) Then I run::
+
+    setup.py build -cmingw32 client
+
+or::
+
+    setup.py build -cmingw32 server
+
+next the install::
+
+    setup.py install --skip-build
+
+(note I'm doing the install and the build separately) 
diff --git a/docs/pyxasw.tar.gz b/docs/pyxasw.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..ee28cf16089c31c818587a942dcebd1cb91dafd2
GIT binary patch
literal 7275
zc$@)i9F*f9iwFQ}8%;g{1MEEga}&3={EGhy)j+U=zmo9r8cN>{A+(uEAWhQ39ft9&
zy|SaS-d$GOB)%Q~_jf*|U3qOM0TQ^KS5Hg4TIuNMoTKw8Ih~#d`mEjStaWeQ)Th^b
z*n9Hm5&Z4-o;-dy^VfcELBsmS`r4yMkJfMX*5KRYTjJ4;VdQ;sZGudQTalh9bE1=F
z{Vsd|H~pj~|M!Cra-<@8?Q`_jdcDUFA1>qndT(RB!vBYlAN6jD-nC=0;Pd~S|98aQ
z-EdPl-nUN0T4zJ7_j()M-g<X!L#(ZBK6<j*>j_5yv2&h^yR|!FPsRCpF;a|@Ot3U{
zYIorER&Gv`Y*XxY#1W5-MZ*D!|COXNZpYG`CD{kv877_lLzBk6*ge|b+uGgVIfRFQ
zC%FhR0G>%HOd@g(e@>JZ!z7eK#UhBO;w+eoDRhj~2iX!jAN(nY278+m2`~<(fJiJt
zrH4_VCNk4v1;(e-OpQ;B?ucD6fklWo5t&Rgsby>eqmo#QV36bnKmZ_st4uIZkup<}
zj2H`@jLaF~2a88k(mYEOEdizx@IK9wQx(b(K-9O6+Pg<}aR%!Lpn!Ci1u?_IksnkX
zwuFSYG86I~@z4UGs!19t83GX#MkJF+-&$>Z``LIntR4J&_to~ZZmzSgiic4i%5F*v
zUhk~K%e~#_2V2L#a)(F_%9q_?5|7jvAnpG~Ad=K{Cm$yWruO=9YkO~}|Lg1hoo8KG
z#h=|I3x<)z?_oYP-5)!kGO(MQK-_J3gPJ%OfDWQ)(@6!0&g3J2NvHHss}=1<mtpPp
z-NyEIQ?!SoJr?aZFdqKZCR0PxhPh2*rm56Iw0G||Xz5LFY!r(2^Kcpm69wb-32-KK
zuM^SU!yy*mCV&7cCz)v%1EPX9@I8#M!JK3=0H{%J6gEuYf9RQryZ@@y{MBrFYa5m;
z_SXX#6Q!Ge*Cj}oJpgYh_J2D9EoDSIO9OMlq%Ia>8@s1LhWw*-&b*I?QEc>y#|OKB
z8gMj-H*2>u7&U@D0g}85Gp-`$-&-^N^Z6DZ&;EN-dA)O7V*l43Z#=Hp|3?qkpZsJ0
zzs0A!S`(}619<!=H(;%B1A0%y8u$P|Zf>ks-2fO&<8aibI10d8NijsV4fdCXs|8kD
z#bYv}ugQvt!+micB>D_2UkJ)g9Pf7k694x_jsuVMTnBjidfx$ne6{lcFuvM*02tTd
zJ}@fiKZw<Ct#-%y3*x8Y<m0e&@^jfzx2EEx?zNo<_*`R&Ii6wW+by91v*8Jl74}m+
zlr)7rH!_O_m~U_yfa87c)Hlrirw-WuZ}&CG0LhJJ+8CtgSZM$t0-Qp{@O2be$O}NO
zS|iywO;p$vf7NP2Ab0^2u=PYf$jLy4KvTz90-Lr(lz^GX4z_&)ZcZe5^nIj8C@0DN
zmN<hg;!Co>azNCMPGU)-ok^1e0hH+wq%Qnxo0!1;Hvle`S!0C=(qh8nRQ2Z5+NW<|
zgFXH4rtYNE>z(5g{r~XE#>092zwwX${}vyNxJdhZ+$Zh7UJU|&-0c0&d=R)LaFCOG
zJ<L>UXdlBC8%#^v@J~#5V=<u@6e6wOND(ISeIrhSQ_w=fm}v))vSgCt_gI|^J=IY%
zMtV$SpmV@B$umT43{xN|m;z!W+pmRx8Tu}_BcS`J-eV0!xi1FFAkwT&aJDn_0%9g2
zc7`x2LS=cl4?sxId$aH`p5TQXDbSuenMj0K=xZ1|%HtvNpabS7q2&aIL?KQL$RQ3y
zvck6@j~us2Wv2{*RW*}Jyas6lp2x8ysMsB_gTZK4P!t>Z&k@9)F;F0zDB#5?3dXv*
ziQ3%Kro(?4bvsD3MLBF!+|xW1zPaJ>H45wE9s!yCES<4gquzJKHn~=4$Q<!$IwEOH
zq=7D6tu)Aj35aWy#A7l)XnIb83(s62m`yHR<)TIM5NpJMruT3m7I4!|g7%G@kj!j*
z0};zJVL-ffK;(9W)?~BKaoVepSaTdK&WWVUi7Og*k<f7+yak-0S*7V>qAbB^F*z8Y
z&!NW-_yxftO2|08Ivt?%%~D|@Hj8N>3s2`F3iRj!DR2NP6?g4IDy01K>XfhpZk8HL
zv06+KhtucC#db0QJGhuALwa|0nsEP{CCM_J7E{Dx^f?4MOrmHI3_mO;NoL<(ohWX^
z&5~s~UW*A+VD%ZKLE=bld_(6Mxx%_$#s91L|JR@VxpkTU|8V{B<44u{&y#=hKi}pf
zyabRFfNBxwp;&vo2_eAR+Jfwl8?*_bfc2_(&}ZxJ6b=fymEeo8yN1521e0OFHHkr7
z5yp{=plyiX5`lL997Yl7&QQVueUD$VBv0)?oywsasUf-M|E(z`Oo)U*7Jfz0fnX@^
z_|m9@IAsHmFAX~oh8KC1xg<-v19tua85Jv|f=K-bCc{ZUgU@G(fT+m?-e6>a!$G4#
z3<B-@K^%->=7!FpJ4gbjT0s9|N(B|27BYZWw00@-l=DU^_7Zl5d#ptRzOObrAfM=h
zE<gk@cFGqaoKb91LOo4@Cq?W5;3k9BCNsa9P9k<w42&TPFwh$}0Wldm@14RSPMnoJ
zPF3J!rbNGm0UxwZ2|!3>SD8r8Vq`q}?3UqRVFxNEc>&6}yd%hXM~L0gZ1T&->0u%@
z#ZK~EX~U2Te5}-Xp;Zfk#3lX>Yjm3aGLV`a|IdpCu3#W7Nke2U!_sKPQ1~i&gof;l
zI}p`OCm$7p8OSk^9k8_C1aYWo@s5+YZHGIBW5)-DY*Dh2#mkKXf}LW4P2AtUFJL*5
z)h11gKGM$SGpxYQ;7BwPyOc!)Ap)^g7;|COa7r7d+zKr*fX${T2>@|gK9M1-M1(Mo
zk^zuZd4Qq>yn>PmCo&3o3%EfUiEfM{K~+kKWeo_9XplxwOx<CiNhz?d20}6n!~wYo
z>M$5Yk`YRYflh-YwEs)NE+bAtfK=50k)(*T^w3}#%oxx;u~nCV1k6iIfjtO1vaM!G
zMsXAnq`|d<gK7VjJoCufWUP&LFzlLPoFOvk;1q^a5*FLkP@D#t!nJk8b2-A&CN9ct
z0Z&zI9qii7GwRPt5X#miED^!*W3Dn_DJkZdGsklnNoxgwSd1MB5Hp1eB#cC5r5*9c
z?XqgJnuf8e(k-VdhIy8Op_rTgKkN`X?CfgX3Njf1^NUS7FXi*wiK$ZIn<w8y3zWxf
z5=3?t)fFtIH6q9RWdXH$JI(BXQut$u`zRrDgJTe|<|}F8R(L#<G%2+%MWSvyCLsM$
zl$_aB;FdZC;*ug}z=5$lYf2+6(a6eOBs7RSqD}^eP2voagkIH&rx^xd{XR%To{$xo
z=R3dbzUpu7?Y(}}KmPS_XY0jL7n*loy_ju8s6;<lk>>sE$vw}{rIsA@_J|!aYx#I<
z>r#n#Yc;#Eh9}@L_xq>dzyM+T{deyn0IEX>QGYtq1&b*CFd6du<L57afDUEViP6Bi
zlh>$C7^%TbF$&vMGS?Jj<7yk`ux8ux7z|rD+hz}S%uej8TNeKX^`*)5ZE$q<)TQdW
zt4J&BxiaIjGKRCM$HRT9RV@R#Y8h?;1IRa}1X$4R(%zE2?}!rQ!Sppdo2zV$UMTqf
zO!NvQ5#&zQ=quLJ*>ncdF%jj6w8v_isZ+nf!tA2;oDN*FSe@d#8NEYwMRpg&&f#JI
z`PPe_{pUL`1cZQd+0L%rlvxHA=gehGL@?r_-vFSJ{$Ra_pv&T;mUfHS?Xgf-Qlc0(
zD(rboaa)DCNX1l)>+I%a_eghY9>K84h>5I&DbW|xvPI!h;9hD}Xvi;U(OW|_9(qnK
zQ+-gt0(KzG?_-1yR*ON*L3;{aKh-|fX7Ne1`4WT<*%(}c&=J@$i%mKG9e~^ewus*~
z+74i3C<pm?j7B`naYLe;%d9%HcCGYVuryJj=>%LwOpSo%)rR%R>SzLfR;SZx))3{F
zyL&s(mLd+PK|ccCfa8Wwz*&*15Wm_@-gkC!7h1VLr+0(2B>*ffWR!w{k0=*j@0v;4
zB@8;|+|*m59z3X1F8~bP#?rtSCV+#C=^s0tmeHtTfx_a=s4;?x>i5FUd!YXTT&l>8
z=7H4l)bB|v4N`_Mj35w!W-0~Wk#VR-ZU?;GeIb5o|6KT@r24>~#wyJtj)tiZ)|<e%
zq49ulS4uxbT4CReE8S?hlQj64LwI?|!qe7%z<+<{K;#J+BMI%~N(SKYA-^~*#V8gr
zfB-oI_b#O<5&YfJ2#m!1#zEiltqNa)tHG6r1~d9xh2YpA8{ylYjK}7rMeD#fhjL_v
z8Qw=AO3y^2=q7#=8k~@1)PU~Irug3yg4pz5A!R3WGEAophS?H4D?lVdI}*EOM&U9{
zBs8GCEWBSYinH3<MvXT5qth`Q^OPmgMUI_|CD8L`?S~O8#v;ntusg|&J-5N=y#!}F
z!J~pm{_}u!q>YGS8&04Nn{dsmL{dEC5RbtrCn$J~5;Lht%f{;4Ez}o%U<o*)d(f?K
znsXzc*5>UFI8<+gJ`OI&HWok=qqyapE7&IfGuU#?ye;LxZRmoJu7Pu^puhhJB5XtC
zIK_%jC@tr#14!>RemIzJW#j%qkZF0Gr;%*nY_KWy9TmZjTw(UFcoMh5Q>+kB(R7;9
z+NW2)@9nYv6AJ{Hq4~ftcZ~fPJ8pa=<PS<BkK)G4T-w+UopbJL<zW(poU14VD7kFZ
zRo#)t3Urlk6wAF0FrC)8I#bFz;XKtB@#Qk|Gxh!I<JIYYIW0Zcs{OOA&Gx~S&!$TY
zo=YixWkN5e^ET=6s}q{^{`FJZ1ADWirim=AXD0m?#O5<#S0T2YW}ynJE{U85UQ$ai
zNCI>bCOdI>?RbC_@R?Y+D%!Q9;tE%viH|M*UOPIr<ocP|aMAVJk>UL0=W<F86Nsrl
zLs2X>lcX|+NshMrt2D=*XsL~~;IFPo++j?F#VIHt;uKvStUpY#{T%^)-(r6gJy$-#
zbCQ6E%HAZypi?caqJp7=kt}>rh`j+OK(mJ~#TO~DjJaXeSc9C<CX>Og{99<Vmq`W@
z$A5=>!d?N<Fjw2UC~PMXPe&4*p&&cG7DJ|37#-XjwPAL#mjC6PxR|fyeaU<#&P?2~
z6^6>D(Tj*95i-V-V>gskc|>W1fDQfpz+h^y2-sdF#)fCcMFUvzO68EM4-lV?@`&Pe
zjyY^Na~8yutfo*D!Ry&zgC^pt+hA(wWS+v3DhF6`6R`=zi9Bb`gjJdxw#Xspsu6_k
z3InTH&*T=ZDtkFG2WZDx&#AcOg1(k>MsrgNnsV}#P^JnV;Pt!Yy?estHWX*E6hw*u
z2fjRb;3P)d2pm<(1Ce0B-djHhCN**h{l=Kk!&#duey83;+}t}Kjfm|qk$CV-tUEcg
z{7#;FnVH#Lq{8FGMhe%U=e=Nudjdt@Ql6q-FB&tc->q%*-WNm~jWi>FsrFx_`mZY-
z!ju#$X%+`q$Pdp%d(8nyBw-nzC}7_(Fabg9i~)Suk1SAFqU8rJ7RMs*?{D7c#syG-
z&+}lgW$-Z%A|EhH1S0c5tl2pVBE#DX=PNs10|B}B1)7y9b(}!2E6Kzh(|z$!MYEZt
z1IoPr)oTg-?^B_J%~edl<NZbau5K(?D^QM@-ozH%8*aGex5h2>jF{uzh&fgOMAcn?
zYTv4Mo4<Y%GSadbMJw#RXE8yzPq}HWY(lQRcW^K_4j7swYGA(>Eu|&a9ygzQc%XE=
zgV_-X>7S;tvpZRukrC_#y_<ZhZ06M^vVptHD!3+x{WeX7JESTv`(z4U$PwFOe$>og
znBp&cG8aG=p?yp2?;QWy|6}WL>+qK&VCi9*u6pgx40r0ET6R2zY7PL!tQSF`4pk5o
zCOHrkiCqMOPX<>&K!oD}?BFq!<-_qHZDp{FNgM<h{9FX4IA&OZWdjNa%Em1hL2~C>
zt8^u2s~{{rT}avTaD%@z_D74A@#BRH<1SS|BXTJn9Ck1-0>eEPEQ<UiZ&~zw$-=15
zB}@BqQ1-N@1yq{aIY_8Nv1H5@LpK~A*8v0%_q6idaDImn0FWJy5Lln^zdio)sRnA-
zxly~eSgwQepoPo7+p7@Zf@l>=-*=<TGPzJm5YCo#16R}oR0fhdfUmM50`!#vjrTWV
z6QENjhac>51#|<`EExm?2)-g^3`~w{)jE8XpU0{`AMEpLNTn?Tlv`pI3yG9XPtX>E
zcEjcE(`q&v_6DKjsnu64R}v<T8*;f4lp77||01b^*?>OQsm90tku<wTI)?%Wwd!8=
zxsFznU-mu6!|Tz!1eySFfYVY?4refFoK9tK7KK$m<xeGhn~v9XzyWjq0p4yjCs~q@
z`Ix{t9aFFe(Tb`u^qjpHXzQ2ugp`Wi4M~h}=}1ncw(Cwcw9wk(B}BY~Gr)pC9)sxE
zV_?fqcwqqoA8{HyI^zzX6&JgbJPN5tA#L_pggvq1PA~uk?BZ~;&g`MEvXJ{LMOAal
z$RNH}6I&V9o?Jr5BkHn)Z>;e=g8-%~p%UvGAfxgWjV*pLSum6=2Qaw*QUY>~729vc
z^;_Y7BrsU*#uJDWJUav=4--MPOTgyS!YT|Zdfe7AFB07`KzKeHXSCDl%Q%?8oQumP
zX<7Jcd9iXCLsyrKgof|1)=WnRz7;`s5nkg{IEoC;cPKx?-dl5?czJ-pd1aO2w)K(h
zEVONDKm9VZpGq)zY>yUb2jV1d@X88|-nKH<-$v!+-Ze|7a2C^^^U>_;2m@X_(f6el
z>PA6_dIKvw%{uw@Ex!ghAHO>cEpSBQc99!6m;z(^Tbh{Xdbm-APkOr|oaORMNdA$C
z0)XdSRtxw|=RzWG9z6g*;e2veI!fnn98?@oCkUv+Zr`Q=u#i!z1y$=j7YSY|S&lhZ
z5XA+;cXRURZsgU!rv$P9UQ}_q0nw|wW#5S8%?jQZ*4dVbWg(ATGn=c2-MmEJtUPjz
z_5B6%!m`{=NMy0_?;w&_u18)blw4c9idlBa_(kTwxW-y<&7nF|XI!AqKY7?-eepVQ
z;fVW!O5-JX6cxtnK*o#UFDp1+f|e^ZUI$iXF5r@~<0UxRa^rQNRAdz{uI(&F$YY)@
zI+iH;wZp%+vUPcdFIKl)vBVEmErmO}2u^=KTf2mC9Vl3oFY%}D@PHT{JB6Ml7#r8~
zsPc3kCL{RXP|>w}jc#x>?+0U&5pNGHu4UeY3Gmo)6(g|30PyQCF$1#|U82R3)i1OI
zp0jMLve&VVi)>sKTYhnMy~3qgY*}@+N_yaW<==ZF7s<x&=r}3fLIrVWm?6ZHJ=0wk
zFL&SW?`(>r6Uv>qGw#A*u?5vZgRgblN-*yGuXnaQdVQCzR;ix*2LZ0^b-APdpd{z-
z78bXHDH~i|Fiy%dBjwp#FVlt@S9|1^P^SA7yY6QRwEdNm@``A2J@0s*u3CY<rz^mT
z2s6Akxacfzc>~|pwdb#WRDS$x+076sUA23Xgs(7{FrSCTW|rVyiyHDs+SgXj8G@Ol
zTiIB@<7${!Y`2%IwwbJUOszbvvpXv8Us=*CPW8EaXF&X+)Y_ieVM^AV0Ykx=nW0il
zT(P%mtQdIn9zln+_=SVwgmvXeI$rk60=zy=$A7GOWe7~djwq0^$G+{HE#YWvEh0B_
zve*-7E8bF82y<NA1Gh=mQZl`}bMBNy!)1XJdxFX915<UHq7+RxhOa`}OPk>^Sr^g_
z>FRZ07ziEUPZJdz|F`S>3ody4JmEi_w&j8D+8*BkwDfT@LM2rzTP{EN1LpVjZh70U
zQD|4^C9R5A$;{kY9>)}C>4fihVoDm18yQ1)1yZb3&`nA@1tRQ{X78Y^RIcIx1!}&7
zWa|!$mD5`X)1#@zR6nfew6WH5OJjZGSCLEPZE~C!(DCmbmg}%TWrX)v{VTtClaqn4
zrbCwxuR3;*%HKod0>SdDs~s`3toa*Qa~DOgwpjmX5R3Ygoc#$YJm=7MzYkXZxdQ)}
z5K(OYuf41LZQBOo&-PzoU{68e%u?i!#>fM0DYiC!xDvg(EsCH+G9&{Q6xj-_*gsz$
zPe&bX8F|Tq6usX=THYPSqe%03{5YMq!||uz&4jA$KWx|NWX{Xg4`1>6ZW}zzjhgs)
zyEkDsJ@47p!T{!L4|mr$eb+VGvDsa@JhlmfKS+E1ga!aUULM)$DQL+WdVQOLI{V%T
zYYeol(-r>1Gqh6`o~NCXcvtqi_Q2XaWUYUuVG(*!v&jS=@!zetfP>hnw-9HZ@78$d
z2Xbt6gaqy4+o2>|oFGZNB629{77s`+xxYS?@_c8KY~1z^J(*wY6t%QNS%0a3q-mj|
zL!P?^P8^Ac(tK)8!srroYRzUsOm9n__t`Yd{Mk3gc7=T3R6c1~(8KsYw@>(V#AETF
zN7Ih@KcU3`c@7+g|GDiB{yaGkqT}IzZYjGBqk)0-;XbH~*!V(Y^ZW?mo!hJJPw0uj
zp%(c>!1oU}{zEtUU&?sw`#<AoKmLDY#vU2}p94SL{c#WXfOqO@?IJhW1hWj#GrEI9
zPtHf<4y&NKAJN{9#^L1)oT7B0aGKi*r(zwR*E&#Br*W*bs?+z$AP8rUo~zwTS7~e+
zlc>iTi#J=9IR-7%wE>_8>9rT6{|>@1fZGFW&pkTtKPLh|`0a@M=cvK@^z6}Wrt!zQ
zJzYt6*}d|1Py$6ua6K@FqyIH^L#riKtjY_OC-wWmS=ebS|D&}uIMwrkq(73z&Bdl(
zkJ8QYL!fx8MmK{$zx?%i@DHq4GuIie;d@@&Npt$ayMmABWk{I0Zr##cn0ap}xOH({
z*7<LplD-nYuho@-OM5=wqk3?kuUi#Q6Yj-1al9#bL>=zRbrsOt(}wwSC%D<tY_s?!
z*fYOIISkq{c)=4TX8(8U$-n%7c+CEX!T$FjqR})G`~MthzW!j_e$Vj(6Ca+BMxEb%
zSl!&;Jbc2aWP{uA^H;R!FjIha#Rp>vD3%<Y1-2HR+nNh&Z9FS;Va!S2GcT6n#^nnb
znGHWJF3W};jwgMc7v*K9RyAy1{7WAc%?!OtR%xx1iZg=DX2{c3rF6nMA#k>JqUv|W
zk~1P;wA2|Zp)8WkTGjZRh%qiznptAVh(-BUrP`7MPtAIpH>%89a=l$Hle(!@#Od`W
zDPp9DjILFst9q#lWCbnDh%-i02r%+(rqfME?;&!GU&@rE!&cgRX@R3(HPRvc-_<67
zRQW4Ng9_CZ{DHO@2AEEZ-xR#0VTkEXRq7JbXMHmPtriP>v8EhMS7nwh)DoWP_{dq7
zIlXbmc@-cpPE?$gey&#`^3p;lt18v+JZ4jTsn@paw2TNDq-V<*BSV|XXSvlLYtpbP
zRn%!x_{=FXu{C`;;P7tx8VKuTTdfuR5@wV%RX52gC94JeXegDZJCj815?w(xu?}%r
zWRS8|ZQ5w3OdC))ABLE&sLjqWU6fiuGQy;5!ZD^@6HX|5(=5X&65{P9g~|?Rm^QDg
zPGhLx@bwF}k^+H1AP@)y0)apv5C{YUfj}S-2m}IwKp+qZ1OkCTAP~GPd;`=Limm{l
F007IZ`wRd8

diff --git a/docs/support-consulting-contact.rst b/docs/support-consulting-contact.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8abbc7f33708d414e3541e6f865bbdeb1c2e5ee4_ZG9jcy9zdXBwb3J0LWNvbnN1bHRpbmctY29udGFjdC5yc3Q=
--- /dev/null
+++ b/docs/support-consulting-contact.rst
@@ -0,0 +1,52 @@
+
+.. _support-consulting-contact:
+
+Support, consulting and contact
+=================================
+
+Public tracker
+--------------
+
+`PyMQI uses Launchpad <https://launchpad.net/pymqi>`_'s infrastructure for tracking public issues and questions,
+feel free to submit anything you feel is a bug here https://bugs.launchpad.net/pymqi.
+If you have any questions related to general PyMQI's usage, please use the
+*Answers tracker* here https://answers.launchpad.net/pymqi.
+
+Support and consulting
+----------------------
+
+* **Dariusz Suchojad** (dsuch@gefira.pl), the current PyMQI's project lead and a seasoned systems architect,
+  is available for consulting work, including custom development and support of solutions
+  using PyMQI,
+
+* **Les Smithson** is the original author and maintainer of PyMQI. Les is available
+  for Python, MQ, Linux/Unix & C/C++ consulting assignments.
+  `See here for his CV and more details <http://www.open-networks.co.uk>`_.
+
+
+Security
+------------
+
+Any security-related issues will be given top priority and should be reported
+directly to the project lead (Dariusz Suchojad, dsuch@gefira.pl). You are encouraged to use this
+`PGP key for contacting me securely <http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x80670F52C9D9FD34>`_,
+the key's fingerprint is *C9D9FD34*.
+
+IRC
+----------
+You're always invited to join the #pymqi channel on `Freenode network <http://freenode.net>`_,
+a friendly place for discussing Python and MQ matters, if you prefer a peer to peer support.
+
+Contact
+----------
+
+If you're not sure where to send your question feel free to e-mail me directly
+at dsuch@gefira.pl.
+
+|rss| `Visit the author's blog <http://www.gefira.pl/blog>`_
+
+|twitter| `Follow @fourthrealm on Twitter, where project's status updates are sent <https://twitter.com/fourthrealm>`_
+
+
+.. |rss| image:: _static/rss-icon.png
+.. |twitter| image:: _static/twitter.png
\ No newline at end of file