Message metadata changes and queries

Use msgmetaget to query message metadata, and msgmetaset to alter message metadata. The arguments for these functions are:

msgmetaset msgId key value ?key2 value2 ...?
msgmetaget ?-rw | -ro | -all? msgId ?key?
  • key in both is DRIVERCTL.
  • Items between question marks are optional.
  • -rw means read-write keys.
  • -ro means read-only keys.
  • -all means all keys (default).

For example, if a user must set the Report options value in MQMD, any, all, or none of these report types can be requested:

  • Exception, which contains these choices, only one of which can be made:
    • MQRO_EXCEPTION
    • MQRO_EXCEPTION_WITH_DATA
    • MQRO_EXCEPTION_WITH_FULL_DATA
  • Expiration, which contains these choices:
    • MQRO_EXPIRATION
    • MQRO_EXPIRATION_WITH_DATA
    • MQRO_EXPIRATION_WITH_FULL_DATA
  • Confirm On Arrival (COA), which contains these choices:
    • MQRO_COA
    • MQRO_COA_WITH_DATA
    • MQRO_COA_WITH_FULL_DATA
  • Confirm On Delivery (COD), which contains these choices:
    • MQRO_COD
    • MQRO_COD_WITH_DATA
    • MQRO_COD_WITH_FULL_DATA
  • Positive Action Notification (PAN)

    MQRO_PAN

  • Negative Action Notification (NAN)

    MQRO_NAN

Note: The PAN and NAN choices (MQRO_PAN and MQRO_NAN) should be mutually exclusive.

To show the above, a msgmetaset command to request an EXCEPTION report with data and a positive action notification is:

msgmetaset msgId DRIVERCTL {MQS {REPORT {MQRO_EXCEPTION_WITH_DATA MQRO_PAN}}}

The engine parses the contents of the DRIVERCTL string in the message metadata and sets the appropriate options in MQMD before sending the message.