Structure data types

A summary of the structure data types, rules for mapping the MQI structures consistently, and conventions used in each structure data type description.

Summary of the structure data types used on MQI calls or exit functions

Table 1. Structure data types used on MQI calls or exit functions
Structure Description Calls where used
MQACH API exit chain header  
MQAIR Authentication information record MQCONNX
MQAXC API exit context  
MQAXP API exit parameter  
MQBMHO Buffer to message handle options MQBUFMH
MQBO Begin options MQBEGIN
MQCBD Callback descriptor MQCB
MQCBO Create-bag options mqCreateBag
MQCHARV Variable length string MQINQMP
MQCNO Connect options MQCONNX
MQCSP Security parameters MQCONNX
MQCTLO Callback options MQCTL
MQDMPO Delete message property options MQDLTMP
MQGMO Get-message options MQGET
MQIMPO Inquire message property options MQINQMP
MQMD Message descriptor MQBUFMH, MQMHBUF, MQCB, MQGET, MQPUT, MQPUT1
MQMHBO Message handle to buffer options MQMHBUF
MQOD Object descriptor MQOPEN, MQPUT1
MQOR Object record MQOPEN, MQPUT1
MQPD Property descriptor MQSETMP
MQPMO Put-message options MQPUT, MQPUT1
MQPMR Put-message record MQPUT, MQPUT1
MQRR Response record MQOPEN, MQPUT, MQPUT1
MQSCO TLS configuration options MQCONNX
MQSD Subscription descriptor MQSUB
MQSMPO Set message property option MQSETMP
MQSRO Subscription request options MQSUBRQ
MQSTS Status reporting structure MQSTAT

Summary of the structure data types used in message data

Table 2. Structure data types used in message data
Structure Description
MQCIH CICS information header
MQCFH PCF header
MQEPH Embedded PCF header
MQDH Distribution header
MQDLH Dead letter (undelivered message) header
MQIIH IMS information header
MQMDE Message descriptor extension
MQRFH Rules and formatting header
MQRFH2 Rules and formatting header 2
MQRMH Reference message header
MQTM Trigger message
MQTMC2 Trigger message (character format 2)
MQWIH Work information header
MQXQH Transmission queue header
Note: The MQDXP structure (data conversion exit parameter) is described in Data-conversion exit, together with the associated data conversion calls.

Rules for mapping the MQI structures consistently

Programming languages vary in their level of support for structures, and certain rules and conventions are adopted to map the MQI structures consistently in each programming language:
  1. Structures must be aligned on their natural boundaries.
    • Most MQI structures require 4-byte alignment.
    • On IBM i, structures containing pointers require 16-byte alignment; these are: MQCNO, MQOD, MQPMO.
  2. Each field in a structure must be aligned on its natural boundary.
    • Fields with data types that equate to MQLONG must be aligned on 4-byte boundaries.
    • Fields with data types that equate to MQPTR must be aligned on 16-byte boundaries on IBM i, and 4-byte boundaries in other environments.
    • Other fields are aligned on 1-byte boundaries.
  3. The length of a structure must be a multiple of its boundary alignment.
    • Most MQI structures have lengths that are multiples of 4 bytes.
    • On IBM i, structures containing pointers have lengths that are multiples of 16 bytes.
  4. Where necessary, padding bytes or fields must be added to ensure compliance with the preceding rules.

Conventions used in each structure data type description

The description of each structure data type includes:
  • An overview of the purpose and use of the structure
  • Descriptions of the fields in the structure, in a form that is independent of the programming language
  • Examples of how the structure is declared in each of the supported programming languages
The description of each structure data type contains the following sections:
Structure name
The name of the structure, followed by a summary of the fields in the structure.
Overview
A brief description of the purpose and use of the structure.
Fields
Descriptions of the fields. For each field, the name of the field is followed by its elementary data type in parentheses ( ). In text, field names are shown using an italic typeface; for example Version.

There is also a description of the purpose of the field, together with a list of any values that the field can take. Names of constants are shown in uppercase; for example MQGMO_STRUC_ID. A set of constants having the same prefix is shown using the * character, for example: MQIA_*.

In the descriptions of the fields, the following terms are used:
input
You supply information in the field when you make a call.
output
The queue manager returns information in the field when the call completes or fails.
input/output
You supply information in the field when you make a call, and the queue manager changes the information when the call completes or fails.
Initial values
A table showing the initial values for each field in the data definition files supplied with the MQI.
C declaration
Typical declaration of the structure in C.
COBOL declaration
Typical declaration of the structure in COBOL.
PL/I declaration
Typical declaration of the structure in PL/I.
High Level Assembler declaration
Typical declaration of the structure in System/390 assembler language.
Visual Basic declaration
Typical declaration of the structure in Visual Basic.