MQCBD - Callback descriptor
The MQCBD structure is used to specify a callback function and the options controlling its use by the queue manager. The structure is an input parameter on the MQCB call.
Availability
The MQCBD structure is available on the following platforms:
- AIX®
- IBM® i
- Linux®
- Solaris
- Windows
- z/OS®
Version
The current version of MQCBD is MQCBD_VERSION_1.
Character set and encoding
Data in MQCBD must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by MQENC_NATIVE. However, if the application is running as an MQ MQI client, the structure must be in the character set and encoding of the client.
Fields
Note: In the following table, the fields are grouped by usage rather than alphabetically. The child
topics follow the same sequence.
Field name and description | Name of constant | Initial value (if any) of constant |
---|---|---|
StrucID (structure identifier) | MQCBD_STRUC_ID | 'CBD¬' |
Version (structure version number) | MQCBD_VERSION_1 | 1 |
CallbackType (type of callback function) | MQCBT_MESSAGE_CONSUMER | 1 |
Options (options controlling message consumption) | MQCBDO_NONE | 0 |
CallbackArea (field for callback function to use) | None | Null pointer or null blanks |
CallbackFunction (whether the function is invoked as an API call) | None | Null pointer or null blanks |
CallbackName (whether the function is invoked as a dynamically-linked program) | None | Null string or blanks |
MaxMsgLength (length of longest message that can be read) | MQCBD_FULL_MSG_LENGTH | -1 |
Notes:
|
Language declarations
C declaration for MQCBD
typedef struct tagMQCBD MQCBD;
struct tagMQCBD {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG CallBackType; /* Callback function type */
MQLONG Options; /* Options controlling message
consumption */
MQPTR CallbackArea; /* User data passed to the function */
MQPTR CallbackFunction; /* Callback function pointer */
MQCHAR128 CallbackName; /* Callback name */
MQLONG MaxMsgLength; /* Maximum message length */
};
COBOL declaration for MQCBD
** MQCBCD structure
10 MQCBD.
** Structure Identifier
15 MQCBD-STRUCID PIC X(4).
** Structure Version
15 MQCBD-VERSION PIC S9(9) BINARY.
** Callback Type
15 MQCBD-CALLBACKTYPE PIC S9(9) BINARY.
** Options
15 MQCBD-OPTIONS PIC S9(9) BINARY.
** Callback User Area
15 MQCBD-CALLBACKAREA POINTER
** Callback Function Pointer
15 MQCBD-CALLBACKFUNCTION FUNCTION-POINTER
** Callback Program Name
15 MQCBD-CALLBACKNAME PIC X(128)
** Maximum Message Length
15 MQCDB-MAXMSGLENGTH PIC S9(9) BINARY.
PL/I declaration for MQCBD
dcl
1 MQCBD based,
3 StrucId char(4), /* Structure identifier*/
3 Version fixed bin(31), /* Structure version*/
3 CallbackType fixed bin(31), /* Callback function type */
3 Options fixed bin(31), /* Options */
3 CallbackArea pointer, /* User area passed to the function */
3 CallbackFunction pointer, /* Callback Function Pointer */
3 CallbackName char(128), /* Callback Program Name */
3 MaxMsgLength fixed bin(31); /* Maximum Message Length */