MQPMO - Put message options
The MQPMO structure allows the application to specify options that control how messages are placed on queues, or published to topics. The structure is an input/output parameter on the MQPUT and MQPUT1 calls.
Version
The current version of MQPMO is MQPMO_VERSION_3. Certain fields are available only in certain versions of MQPMO. If you need to port applications between several environments, you must ensure that the version of MQPMO is consistent across all environments. Fields that exist only in particular versions of the structure are identified as such in this topic and in the field descriptions.
The header, COPY, and INCLUDE files provided for the supported programming languages contain the
most-recent version of MQPMO that is supported by the environment, but with the initial value of the
Version
field set to MQPMO_VERSION_1. To use fields that are not
present in the version-1 structure, the application must set the
Version
field to the version number of the version required.
Character set and encoding
Data in MQPMO 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) | MQPMO_STRUC_ID | 'PMO¬' |
Version (structure version number) | MQPMO_VERSION_1 | 1 |
Options (options that control the action of MQPUT and MQPUT1) | MQPMO_NONE | 0 |
Timeout (reserved) | None | -1 |
Context (object handle of input queue) | None | 0 |
KnownDestCount (number of messages sent successfully to local queues) | None | 0 |
UnknownDestCount (number of messages sent successfully to remote queues) | None | 0 |
InvalidDestCount (number of messages that could not be sent) | None | 0 |
ResolvedQName (resolved name of destination queue) | None | Null string or blanks |
ResolvedQMgrName (resolved name of destination queue manager) | None | Null string or blanks |
Note: The remaining fields are ignored if
Version is less than
MQPMO_VERSION_2. |
||
RecsPresent (number of put message records or response records present) | None | 0 |
PutMsgRecFields (flags indicating which MQPMR fields are present) | MQPMRF_NONE | 0 |
PutMsgRecOffset (offset of first put message record from start of MQPMO) | None | 0 |
ResponseRecOffset (offset of first response record from start of MQPMO) | None | 0 |
PutMsgRecPtr (address of first put message record) | None | Null pointer or null bytes |
ResponseRecPtr (address of first response record) | None | Null pointer or null bytes |
Note: The remaining fields are ignored if
Version is less than
MQPMO_VERSION_3. |
||
OriginalMsgHandle (original message handle) | MQHM_NONE | 0 |
NewMsgHandle (new message handle) | MQHM_NONE | 0 |
Action (type of put being performed and the
relationship between the original message specified by the
OriginalMsgHandle field and the new message specified by the
NewMsgHandle field) |
MQACTP_NEW | 0 |
PubLevel (level of subscription targeted by the publication) | None | 9 |
Notes:
|
Language declarations
C declaration for MQPMO
typedef struct tagMQPMO MQPMO;
struct tagMQPMO {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG Options; /* Options that control the action of
MQPUT and MQPUT1 */
MQLONG Timeout; /* Reserved */
MQHOBJ Context; /* Object handle of input queue */
MQLONG KnownDestCount; /* Number of messages sent
successfully to local queues */
MQLONG UnknownDestCount; /* Number of messages sent
successfully to remote queues */
MQLONG InvalidDestCount; /* Number of messages that could not
be sent */
MQCHAR48 ResolvedQName; /* Resolved name of destination
queue */
MQCHAR48 ResolvedQMgrName; /* Resolved name of destination queue
manager */
/* Ver:1 */
MQLONG RecsPresent; /* Number of put message records or
response records present */
MQLONG PutMsgRecFields; /* Flags indicating which MQPMR fields
are present */
MQLONG PutMsgRecOffset; /* Offset of first put message record
from start of MQPMO */
MQLONG ResponseRecOffset; /* Offset of first response record
from start of MQPMO */
MQPTR PutMsgRecPtr; /* Address of first put message
record */
MQPTR ResponseRecPtr; /* Address of first response record */
/* Ver:2 */
MQHMSG OriginalMsgHandle; /* Original message handle */
MQHMSG NewMsgHandle; /* New message handle */
MQLONG Action; /* The action being performed */
MQLONG PubLevel; /* Subscription level */
/* Ver:3 */
};
COBOL declaration for MQPMO
** MQPMO structure
10 MQPMO.
** Structure identifier
15 MQPMO-STRUCID PIC X(4).
** Structure version number
15 MQPMO-VERSION PIC S9(9) BINARY.
** Options that control the action of MQPUT and MQPUT1
15 MQPMO-OPTIONS PIC S9(9) BINARY.
** Reserved
15 MQPMO-TIMEOUT PIC S9(9) BINARY.
** Object handle of input queue
15 MQPMO-CONTEXT PIC S9(9) BINARY.
** Number of messages sent successfully to local queues
15 MQPMO-KNOWNDESTCOUNT PIC S9(9) BINARY.
** Number of messages sent successfully to remote queues
15 MQPMO-UNKNOWNDESTCOUNT PIC S9(9) BINARY.
** Number of messages that could not be sent
15 MQPMO-INVALIDDESTCOUNT PIC S9(9) BINARY.
** Resolved name of destination queue
15 MQPMO-RESOLVEDQNAME PIC X(48).
** Resolved name of destination queue manager
15 MQPMO-RESOLVEDQMGRNAME PIC X(48).
** Number of put message records or response records present
15 MQPMO-RECSPRESENT PIC S9(9) BINARY.
** Flags indicating which MQPMR fields are present
15 MQPMO-PUTMSGRECFIELDS PIC S9(9) BINARY.
** Offset of first put message record from start of MQPMO
15 MQPMO-PUTMSGRECOFFSET PIC S9(9) BINARY.
** Offset of first response record from start of MQPMO
15 MQPMO-RESPONSERECOFFSET PIC S9(9) BINARY.
** Address of first put message record
15 MQPMO-PUTMSGRECPTR POINTER.
** Address of first response record
15 MQPMO-RESPONSERECPTR POINTER.
** Original message handle
15 MQPMO-ORIGINALMSGHANDLE PIC S9(18) BINARY.
** New message handle
15 MQPMO-NEWMSGHANDLE PIC S9(18) BINARY.
** The action being performed
15 MQPMO-ACTION PIC S9(9) BINARY.
** Publish level
15 MQPMO-PUBLEVEL PIC S9(9) BINARY.
PL/I declaration for MQPMO
dcl
1 MQPMO 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 MQPUT and MQPUT1 */
3 Timeout fixed bin(31), /* Reserved */
3 Context fixed bin(31), /* Object handle of input queue */
3 KnownDestCount fixed bin(31), /* Number of messages sent
successfully to local queues */
3 UnknownDestCount fixed bin(31), /* Number of messages sent
successfully to remote queues */
3 InvalidDestCount fixed bin(31), /* Number of messages that could
not be sent */
3 ResolvedQName char(48), /* Resolved name of destination
queue */
3 ResolvedQMgrName char(48), /* Resolved name of destination
queue manager */
3 RecsPresent fixed bin(31), /* Number of put message records or
response records present */
3 PutMsgRecFields fixed bin(31), /* Flags indicating which MQPMR
fields are present */
3 PutMsgRecOffset fixed bin(31), /* Offset of first put message
record from start of MQPMO */
3 ResponseRecOffset fixed bin(31), /* Offset of first response record
from start of MQPMO */
3 PutMsgRecPtr pointer, /* Address of first put message
record */
3 ResponseRecPtr pointer, /* Address of first response
record */
3 OriginalMsgHandle fixed bin(63), /* Original message handle */
3 NewMsgHandle fixed bin(63); /* New message handle */
3 Action fixed bin(31); /* The action being performed */
3 PubLevel fixed bin(31); /* Publish level */
High Level Assembler declaration for MQPMO
MQPMO DSECT
MQPMO_STRUCID DS CL4 Structure identifier
MQPMO_VERSION DS F Structure version number
MQPMO_OPTIONS DS F Options that control the action of
* MQPUT and MQPUT1
MQPMO_TIMEOUT DS F Reserved
MQPMO_CONTEXT DS F Object handle of input queue
MQPMO_KNOWNDESTCOUNT DS F Number of messages sent successfully
* to local queues
MQPMO_UNKNOWNDESTCOUNT DS F Number of messages sent successfully
* to remote queues
MQPMO_INVALIDDESTCOUNT DS F Number of messages that could not be
* sent
MQPMO_RESOLVEDQNAME DS CL48 Resolved name of destination queue
MQPMO_RESOLVEDQMGRNAME DS CL48 Resolved name of destination queue
* manager
MQPMO_RECSPRESENT DS F Number of put message records or
* response records present
MQPMO_PUTMSGRECFIELDS DS F Flags indicating which MQPMR
* fields are present
MQPMO_PUTMSGRECOFFSET DS F Offset of first put message record
* from start of MQPMO
MQPMO_RESPONSERECOFFSET DS F Offset of first response record
* from start of MQPMO
MQPMO_PUTMSGRECPTR DS F Address of first put message
* record
MQPMO_RESPONSERECPTR DS F Address of first response record
MQPMO_ORIGINALMSGHANDLE DS D Original message handle
MQPMO_NEWMSGHANDLE DS D New message handle
MQPMO_ACTION DS F The action being performed
MQPMO_PUBLEVEL DS F Publish level
*
MQPMO_LENGTH EQU *-MQPMO
ORG MQPMO
MQPMO_AREA DS CL(MQPMO_LENGTH)
Visual Basic declaration for MQPMO
Type MQPMO
StrucId As String*4 'Structure identifier'
Version As Long 'Structure version number'
Options As Long 'Options that control the action of'
'MQPUT and MQPUT1'
Timeout As Long 'Reserved'
Context As Long 'Object handle of input queue'
KnownDestCount As Long 'Number of messages sent successfully'
'to local queues'
UnknownDestCount As Long 'Number of messages sent successfully'
'to remote queues'
InvalidDestCount As Long 'Number of messages that could not be'
'sent'
ResolvedQName As String*48 'Resolved name of destination queue'
ResolvedQMgrName As String*48 'Resolved name of destination queue'
'manager'
RecsPresent As Long 'Number of put message records or'
'response records present'
PutMsgRecFields As Long 'Flags indicating which MQPMR fields'
'are present'
PutMsgRecOffset As Long 'Offset of first put message record'
'from start of MQPMO'
ResponseRecOffset As Long 'Offset of first response record from'
'start of MQPMO'
PutMsgRecPtr As MQPTR 'Address of first put message record'
ResponseRecPtr As MQPTR 'Address of first response record'
End Type