MQGMO - Get-message options
The MQGMO structure allows the application to control how messages are removed from queues. The structure is an input/output parameter on the MQGET call.
Version
The current version of MQGMO is MQGMO_VERSION_4. Certain fields are available only in certain versions of MQGMO. If you need to port applications between several environments, you must ensure that the version of MQGMO is consistent across all environments. Fields that exist only in particular versions of the structure are identified as such in MQGMO - Get-message options and in the field descriptions.
The header, COPY, and INCLUDE files provided for the supported programming languages contain the
most recent version of MQGMO that is supported by the environment, but with the initial value of the
Version
field set to MQGMO_VERSION_1. To use fields that are not
present in the version-1 structure, set the Version
field to the
version number of the version required.
Character set and encoding
Data in MQGMO 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
Field name and description | Name of constant | Initial value (if any) of constant |
---|---|---|
StrucId (structure identifier) | MQGMO_STRUC_ID | 'GMO¬' |
Version (structure version number) | MQGMO_VERSION_1 | 1 |
MQGMO - Options field (options that control the action of MQGET) | MQGMO_NO_WAIT | 0 |
WaitInterval (wait interval) | None | 0 |
Signal1 (signal) | None | Null pointer on z/OS® ;
0 otherwise |
Signal2 (signal identifier) | None | 0 |
ResolvedQName (resolved name of destination queue) | None | Null string or blanks |
Note: The remaining fields are ignored if
Version is less than
MQGMO_VERSION_2. |
||
MatchOptions (options controlling selection criteria used for MQGET) | MQMO_MATCH_MSG_ID + MQMO_MATCH_CORREL_ID | 3 |
GroupStatus (flag indicating whether message retrieved is in a group) | MQGS_NOT_IN_GROUP | '¬' |
SegmentStatus (flag indicating whether message retrieved is a segment of a logical message) | MQSS_NOT_A_SEGMENT | '¬' |
Segmentation (flag indicating whether further segmentation is allowed for the message retrieved) | MQSEG_INHIBITED | '¬' |
Reserved1 (reserved) | None | '¬' |
Note: The remaining fields are ignored if
Version is less than
MQGMO_VERSION_3. |
||
MsgToken (message token) | MQMTOK_NONE | Nulls |
ReturnedLength (length in bytes of message data returned) | MQRL_UNDEFINED | -1 |
Note: The remaining fields are ignored if
Version is less than
MQGMO_VERSION_4. |
||
Reserved2 (reserved) | None | '¬' |
MsgHandle (handle to a message that is to be populated with the properties of the message being retrieved from the queue) | MQHM_NONE | 0 |
Notes:
|
Language declarations
C declaration for MQGMO
typedef struct tagMQGMO MQGMO;
struct tagMQGMO {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG Options; /* Options that control the action of */
MQGET */
MQLONG WaitInterval; /* Wait interval */
MQLONG Signal1; /* Signal */
MQLONG Signal2; /* Signal identifier */
MQCHAR48 ResolvedQName; /* Resolved name of destination queue */
/* Ver:1 */
MQLONG MatchOptions; /* Options controlling selection */
criteria used for MQGET */
MQCHAR GroupStatus; /* Flag indicating whether message */
retrieved is in a group */
MQCHAR SegmentStatus; /* Flag indicating whether message */
retrieved is a segment of a logical */
message */
MQCHAR Segmentation; /* Flag indicating whether further */
segmentation is allowed for the */
message retrieved */
MQCHAR Reserved1; /* Reserved */
/* Ver:2 */
MQBYTE16 MsgToken; /* Message token */
MQLONG ReturnedLength; /* Length of message data returned */
(bytes) */
/* Ver:3 */
MQLONG Reserved2; /* Reserved */
MQHMSG MsgHandle; /* Message handle */
/* Ver:4 */
};
Signal1
field is declared as PMQLONG
.COBOL declaration for MQGMO
** MQGMO structure
10 MQGMO.
** Structure identifier
15 MQGMO-STRUCID PIC X(4).
** Structure version number
15 MQGMO-VERSION PIC S9(9) BINARY.
** Options that control the action of MQGET
15 MQGMO-OPTIONS PIC S9(9) BINARY.
** Wait interval
15 MQGMO-WAITINTERVAL PIC S9(9) BINARY.
** Signal
15 MQGMO-SIGNAL1 PIC S9(9) BINARY.
** Signal identifier
15 MQGMO-SIGNAL2 PIC S9(9) BINARY.
** Resolved name of destination queue
15 MQGMO-RESOLVEDQNAME PIC X(48).
** Options controlling selection criteria used for MQGET
15 MQGMO-MATCHOPTIONS PIC S9(9) BINARY.
** Flag indicating whether message retrieved is in a group
15 MQGMO-GROUPSTATUS PIC X.
** Flag indicating whether message retrieved is a segment of a
** logical message
15 MQGMO-SEGMENTSTATUS PIC X.
** Flag indicating whether further segmentation is allowed for the
** message retrieved
15 MQGMO-SEGMENTATION PIC X.
** Reserved
15 MQGMO-RESERVED1 PIC X.
** Message token
15 MQGMO-MSGTOKEN PIC X(16).
** Length of message data returned (bytes)
15 MQGMO-RETURNEDLENGTH PIC S9(9) BINARY.
** Reserved
15 MQGMO-RESERVED2 PIC S9(9) BINARY.
** Message handle
15 MQGMO-MSGHANDLE PIC S9(18) BINARY.
Signal1
field is declared as POINTER
.PL/I declaration for MQGMO
dcl
1 MQGMO based,
3 StrucId char(4), /* Structure identifier */
3 Version fixed bin(31), /* Structure version number */
3 Options fixed bin(31), /* Options that control the action of
MQGET */
3 WaitInterval fixed bin(31), /* Wait interval */
3 Signal1 fixed bin(31), /* Signal */
3 Signal2 fixed bin(31), /* Signal identifier */
3 ResolvedQName char(48), /* Resolved name of destination
queue */
3 MatchOptions fixed bin(31), /* Options controlling selection
criteria used for MQGET */
3 GroupStatus char(1), /* Flag indicating whether message
retrieved is in a group */
3 SegmentStatus char(1), /* Flag indicating whether message
retrieved is a segment of a logical
message */
3 Segmentation char(1), /* Flag indicating whether further
segmentation is allowed for the
message retrieved */
3 Reserved1 char(1), /* Reserved */
3 MsgToken char(16), /* Message token */
3 ReturnedLength fixed bin(31); /* Length of message data returned
(bytes) */
3 Reserved2 fixed bin(31); /* Reserved */
3 MsgHandle fixed bin(63); /* Message handle */
Signal1
field is declared as pointer
.High Level Assembler declaration for MQGMO
MQGMO DSECT
MQGMO_STRUCID DS CL4 Structure identifier
MQGMO_VERSION DS F Structure version number
MQGMO_OPTIONS DS F Options that control the action of
* MQGET
MQGMO_WAITINTERVAL DS F Wait interval
MQGMO_SIGNAL1 DS F Signal
MQGMO_SIGNAL2 DS F Signal identifier
MQGMO_RESOLVEDQNAME DS CL48 Resolved name of destination queue
MQGMO_MATCHOPTIONS DS F Options controlling selection criteria
* used for MQGET
MQGMO_GROUPSTATUS DS CL1 Flag indicating whether message
* retrieved is in a group
MQGMO_SEGMENTSTATUS DS CL1 Flag indicating whether message
* retrieved is a segment of a logical
* message
MQGMO_SEGMENTATION DS CL1 Flag indicating whether further
* segmentation is allowed for the message
* retrieved
MQGMO_RESERVED1 DS CL1 Reserved
MQGMO_MSGTOKEN DS XL16 Message token
MQGMO_RETURNEDLENGTH DS F Length of message data returned (bytes)
MQGMO_RESERVED2 DS F Reserved
MQGMO_MSGHANDLE DS D Message handle
MQGMO_LENGTH EQU *-MQGMO
ORG MQGMO
MQGMO_AREA DS CL(MQGMO_LENGTH)
High Level Assembler declaration for MQGMO
Type MQGMO
StrucId As String*4 'Structure identifier'
Version As Long 'Structure version number'
Options As Long 'Options that control the action of MQGET'
WaitInterval As Long 'Wait interval'
Signal1 As Long 'Signal'
Signal2 As Long 'Signal identifier'
ResolvedQName As String*48 'Resolved name of destination queue'
MatchOptions As Long 'Options controlling selection criteria'
'used for MQGET'
GroupStatus As String*1 'Flag indicating whether message'
'retrieved is in a group'
SegmentStatus As String*1 'Flag indicating whether message'
'retrieved is a segment of a logical'
'message'
Segmentation As String*1 'Flag indicating whether further'
'segmentation is allowed for the message'
'retrieved'
Reserved1 As String*1 'Reserved'
MsgToken As MQBYTE16 'Message token'
ReturnedLength As Long 'Length of message data returned (bytes)'
End Type
PROPCTL channel options for MQGMO
Use the PROPCTL channel attribute to control which message properties are included in a message that is sent from an IBM® MQ 9.1 queue manager to a partner queue manager from an earlier version of IBM MQ.
PROPCTL | Description |
---|---|
ALL |
Use this option if applications connected to the partner queue manager from an earlier version are able to process any properties placed in a message by an IBM MQ 9.1 application. All properties are sent to the partner queue manager, in addition to any name-value pairs placed
in the You must consider two application design issues:
With the |
COMPAT |
Use this option to send message properties to applications connected to an earlier version partner queue manager in some cases, but not all. Message properties are only sent if two conditions are met:
With the COMPAT channel option set, JMS applications can interoperate between IBM MQ 9.1 and an earlier version using the channel. The channel is not available to every application using message properties, only to those applications that use the reserved folders. The rules concerning whether the message or the property is sent are:
Note: The
reservedfolders names start with mcd. ,
jms. , usr. , or mqext. . These folders are created
for applications that use the JMS interface. In
IBM MQ 9.1 any name-value pairs that are placed in
these folders are treated as message properties. Message properties are sent in an |
NONE |
Use this option to prevent any message properties being sent to applications connected to an
earlier version partner queue manager. An With the |
PROPCTL queue options for MQGMO
Use the PROPCTL queue attribute to control how message properties are returned to an application that calls MQGET without setting any MQGMO message property options.
PROPCTL | Description |
---|---|
ALL |
Use the ALL option so that different applications reading a message from the same queue can process the message in different ways.
All the properties in the message are returned to the application.
ALL only has this effect if the receiving application has not set a
|
COMPAT (default) |
COMPAT is the default option. If Use this option if you have written an earlier version application MQI application to read JMS messages.
If a message contains new user property folders, you can infer that the message was created by a
new or changed IBM MQ 9.1 application. If the
receiving application is to process these new properties directly in an The intent of the COMPAT only has this effect if the receiving application has not set a
|
FORCE |
The FORCE option places all messages properties into Suppose you have modified an application to process IBM MQ 9.1 message properties, but have also retained its
ability to work directly with FORCE only has this effect if the receiving application has not set a
|
NONE |
Use the NONE option so that an existing application can process a message,
ignoring all message properties, and a new or changed application can query message properties.
NONE only has this effect if the receiving application has not set a
|
V6COMPAT |
Use this option to receive an This option has to be set on both the sending and receiving queues, and any intervening transmission queues. It overrides any other PROPCTL options set on queue definitions in the queue name resolution path. Use the V6COMPAT option only in exceptional circumstances. For example, if you are migrating applications from an earlier version to IBM MQ 9.1, the option is valuable because it preserves the behavior of the earlier version. The option is likely to have an impact on message throughput. It is also more difficult to administer; you need to ensure the option is set on the sender, receiver, and intervening transmission queues. V6COMPAT only has this effect if the receiving application has not set a
|
For more information about message properties and name-value pairs, see NameValueData ( MQCHARn).
Message property options for MQGMO
Use the MQGMO message property options to control how message properties are returned to an application.
MQGMO Option | Description |
---|---|
MQGMO_PROPERTIES_AS_Q_DEF |
IBM MQ applications that read from the same
queue, and do not set
|
MQGMO_PROPERTIES_IN_HANDLE |
Force an application to use message properties. Use this option to detect if a
modified application fails to create message handle. The application might be trying to read message
properties directly from an |
MQGMO_NO_PROPERTIES |
|
MQGMO_PROPERTIES_FORCE_MQRFH2 |
Properties are returned in the
|
MQGMO_PROPERTIES_COMPATIBILITY |
If the message is from a JMS client,
the JMS properties are returned in the
|