MQPD - Property descriptor
The MQPD is used to define the attributes of a property.
Overview
Purpose: The structure is an input/output parameter on the MQSETMP call and an output parameter on the MQINQMP call.
Character set and encoding: Data in MQPD must be in the character set of the application and encoding of the application (ENNAT).
Fields
The MQPD structure contains the following fields; the fields are described in alphabetical order:
- PDCT (10-digit signed integer)
-
This describes what message context the property belongs to.
When a queue manager receives a message containing an IBM MQ -defined property that the queue manager recognizes as being incorrect. the queue manager corrects the value of the PDCT field.
The following option can be specified:- PDUSC
- The property is associated with the user context.
No special authorization is required to be able to set a property associated with the user context using the MQSETMP call.
On a IBM WebSphere MQ Version 7.0 queue manager, a property associated with the user context is saved as described for OOSAVA. An MQPUT call with PMPASA specified, causes the property to be copied from the saved context into the new message.
If the option previously described is not required, the following option can be used:
- PDNOC
- The property is not associated with a message context.
An unrecognized value is rejected with a PDREA code of RC2482.
This is an input/output field to the MQSETMP call and an output field from the MQINQMP call. The initial value of this field is PDNOC.
- PDCPYOPT (10-digit signed integer)
-
This describes which type of messages the property should be copied into.
This is an output only field for recognized IBM MQ-defined properties; IBM MQ sets the appropriate value.
When a queue manager receives a message containing an IBM MQ-defined property that the queue manager recognizes as being incorrect. the queue manager corrects the value of the CopyOptions field.
We can specify one or more of these options. To specify more than one option, either add the values together (do not add the same constant more than once), or combine the values using the bitwise OR operation (if the programming language supports bit operations).- COPFOR
- This property is copied into a message being forwarded.
- COPPUB
- This property is copied into the message received by a subscriber when a message is being published.
- COPREP
- This property is copied into a reply message.
- COPRP
- This property is copied into a report message.
- COPALL
- This property is copied into all types of subsequent messages.
- COPNON
- This property is not copied into a message.
Default option: The following option can be specified to supply the default set of copy options:
- COPDEF
- This property is copied into a message being forwarded, into a report message, or into a message received by a subscriber when a message is being published.
This is equivalent to specifying the combination of options COPFOR, plus COPRP, plus COPPUB.
If none of the options described previously are required, use the following option:
- COPNON
- Use this value to indicate that no other copy options have been specified; programmatically no relationship exists between this property and subsequent messages. This is always returned for message descriptor properties.
This is an input/output field to the MQSETMP call and an output field from the MQINQMP call. The initial value of this field is COPDEF.
- PDOPT (10-digit signed integer)
-
The value must be:
- PDNONE
- No options specified
This is always an input field. The initial value of this field is PDNONE.
- PDSID (10-digit signed integer)
-
This is the structure identifier; the value must be:
- PSIDV
- Identifier for property descriptor structure.
This is always an input field. The initial value of this field is PSIDV.
- PDSUP (10-digit signed integer)
-
This field describes what level of support for the message property is required of the queue manager, in order for the message containing this property to be put to a queue. This applies only to IBM MQ-defined properties; support for all other properties is optional.
The field is automatically set to the correct value when the IBM MQ-defined property is known by the queue manager. If the property is not recognized, PDSUPO is assigned. When a queue manager receives a message containing an IBM MQ-defined property that the queue manager recognizes as being incorrect. the queue manager corrects the value of the PDSUP field.
When setting an IBM MQ-defined property using the MQSETMP call on a message handle where the CMNOVA option was set, PDSUP becomes an input field. This allows an application to put an IBM MQ-defined property, with the correct value, where the property is unsupported by the connected queue manager, but where the message is intended to be processed on another queue manager.
The value PDSUPO is always assigned to properties that are not IBM MQ-defined properties.
If a IBM WebSphere MQ Version 7.0 queue manager, that supports message properties, receives a property that contains an unrecognized PDSUP value, the property is treated as if:- PDSUPR was specified if any of the unrecognized values are contained in the PDRUM.
- PDSUPL was specified if any of the unrecognized values are contained in the PDAUXM
- PDSUPO was specified otherwise.
One of the following values is returned by the MQINQMP call, or one of the values can be specified, when using the MQSETMP call on a message handle where the CMNOVA option is set:
- PDSUPO
- The property is accepted by a queue manager even if it is not supported. The property can be discarded in order for the message to flow to a queue manager that does not support message properties. This value is also assigned to properties that are not IBM MQ-defined.
- PDSUPR
- Support for the property is required. The message is rejected by a queue manager that does not support the IBM MQ-defined property. The MQPUT or MQPUT1 call fails with completion code CCFAIL and reason code RC2490.
- PDSUPL
- The message is rejected by a queue manager that does not support the IBM MQ-defined property if the message is destined for a local queue. The MQPUT or MQPUT1 call fails with completion code CCFAIL and reason code RC2490.
The MQPUT or MQPUT1 call succeeds if the message is destined for a remote queue manager.
This is an output field on the MQINQMP call and an input field on the MQSETMP call if the message handle was created with the CMNOVA option set. The initial value of this field is PDSUPO.
- PDVER (10-digit signed integer)
-
This is the structure version number; the value must be:
PDVER1
Version-1 property descriptor structure.
The following constant specifies the version number of the current version:
PDVERC
Current version of property descriptor structure.
This is always an input field. The initial value of this field is PDVER1.
Initial values
Field name | Name of constant | Value of constant |
---|---|---|
PDSID | PDSIDV | 'PD' |
PDVER | PDVER1 | 1 |
PDOPT | PDNONE | 0 |
PDSUP | PDSUPO | 0 |
PDCT | PDNOC | 0 |
PDCPYOPT | COPDEF | 0 |
RPG declaration
D* MQDMHO Structure D* D* D* Structure identifier D DMSID 1 4 INZ('DMHO') D* D* Structure version number D DMVER 5 8I 0 INZ(1) D* D* Options that control the action of MQDLTMH D DMOPT 9 12I 0 INZ(0)Parent topic: Data type descriptions on IBM i