GMMO (10-digit signed integer)

Options controlling selection criteria used for MQGET.

These options allow the application to choose which fields in the MSGDSC parameter will be used to select the message returned by the MQGET call. The application sets the required options in this field, and then sets the corresponding fields in the MSGDSC parameter to the values required for those fields. Only messages that have those values in the MQMD for the message are candidates for retrieval using that MSGDSC parameter on the MQGET call. Fields for which the corresponding match option is not specified are ignored when selecting the message to be returned. If no selection criteria are to be used on the MQGET call (that is, any message is acceptable), GMMO should be set to MONONE.

If GMLOGO is specified, only certain messages are eligible for return by the next MQGET call:

In both of the above cases, match options which are not applicable can still be specified, but the value of the relevant field in the MSGDSC parameter must match the value of the corresponding field in the message to be returned; the call fails with reason code RC2247 is this condition is not satisfied.

GMMO is ignored if either GMMUC or GMBRWC is specified.

One or more of the following match options can be specified:

MOMSGI

Retrieve message with specified message identifier.

This option specifies that the message to be retrieved must have a message identifier that matches the value of the MDMID field in the MSGDSC parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the correlation identifier).

If this option is not specified, the MDMID field in the MSGDSC parameter is ignored, and any message identifier will match.

Note:
The message identifier MINONE is a special value that matches any message identifier in the MQMD for the message. Therefore, specifying MOMSGI with MINONE is the same as not specifying MOMSGI.

MOCORI

Retrieve message with specified correlation identifier.

This option specifies that the message to be retrieved must have a correlation identifier that matches the value of the MDCID field in the MSGDSC parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the message identifier).

If this option is not specified, the MDCID field in the MSGDSC parameter is ignored, and any correlation identifier will match.

Note:
The correlation identifier CINONE is a special value that matches any correlation identifier in the MQMD for the message. Therefore, specifying MOCORI with CINONE is the same as not specifying MOCORI.

MOGRPI

Retrieve message with specified group identifier.

This option specifies that the message to be retrieved must have a group identifier that matches the value of the MDGID field in the MSGDSC parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the correlation identifier).

If this option is not specified, the MDGID field in the MSGDSC parameter is ignored, and any group identifier will match.

Note:
The group identifier GINONE is a special value that matches any group identifier in the MQMD for the message. Therefore, specifying MOGRPI with GINONE is the same as not specifying MOGRPI.

MOSEQN

Retrieve message with specified message sequence number.

This option specifies that the message to be retrieved must have a message sequence number that matches the value of the MDSEQ field in the MSGDSC parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the group identifier).

If this option is not specified, the MDSEQ field in the MSGDSC parameter is ignored, and any message sequence number will match.

MOOFFS

Retrieve message with specified offset.

This option specifies that the message to be retrieved must have an offset that matches the value of the MDOFF field in the MSGDSC parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the message sequence number).

If this option is not specified, the MDOFF field in the MSGDSC parameter is ignored, and any offset will match.

If none of the options described above is specified, the following option can be used:

MONONE

No matches.

This option specifies that no matches are to be used in selecting the message to be returned; therefore, all messages on the queue are eligible for retrieval (but subject to control by the GMAMSA, GMASGA, and GMCMPM options).

MONONE is defined to aid program documentation. It is not intended that this option be used with any other MO* option, but as its value is zero, such use cannot be detected.

This is an input field. The initial value of this field is MOMSGI with MOCORI. This field is ignored if GMVER is less than GMVER2.

Note:
The initial value of the GMMO field is defined for compatibility with earlier verison queue managers . However, when reading a series of messages from a queue without using selection criteria, this initial value requires the application to reset the MDMID and MDCID fields to MINONE and CINONE prior to each MQGET call. The need to reset MDMID and MDCID can be avoided by setting GMVER to GMVER2, and GMMO to MONONE.