Changing MQMD field values

There are three methods available for changing or viewing the MQMD field values:

  • Method #1: Select values within the Network Configurator.

    Indicate the value of these fields one time in the Network Configurator when establishing the WebSphere MQ protocol thread. This is particularly useful when setting the MQMD fields. The values are the same for a large number of records to be output from the system.

    MQMD Features on the MQ Outqueue Advanced Properties dialog box opens the MQ Message Descriptor Properties dialog box.

    Use this dialog box to specify the values. These values are cached and are not changed unless a Tcl procedure indicates otherwise.

  • Method #2: Change or display using Tcl.

    Dynamically change the contents of the message metadata string DRIVERCTL as each message is put into the outbound queue. You can also display the contents of DRIVERCTL as a message is read from the inbound queue. This is only if CopyMQMD is set under the inbound queue parameters. This is performed by following the instructions in a Tcl procedure, or Tcl procedure stack.

    This Tcl procedure can be associated with any UPoC, including the UPoC protocol. The name of this procedure, along with any arguments, is entered into the NetConfig file through the Network Configurator. To do this:

    1. On the Network Configurator, click a connection icon and select the Inbound or Outbound tab.
    2. Select the appropriate entry and click Edit to open the TPS Editor.
    3. Then, click Add to select the procedures.
  • Method #3: Pass through MQMD values.

    This method assumes that the messages initially received have originated from a server using Websphere MQ. In this case, the user may keep all, or some, of the MQMD parameter values when the message is sent to another Websphere MQ server. This choice is indicated through the CopyMQMD parameter in the inbound queue section. This section is accessed by clicking Advanced which opens the MQ Inqueue Advanced Properties dialog box.

    Selecting CopyMQMD for the inbound queue means that the incoming MQMD values are to be copied to the DRIVERCTL.

    In general, the incoming message contains all MQMD fields. Therefore, selecting CopyMQMD for the inbound queue overrides all values that are specified in the NetConfig file and pass MQMD values from input to output. This is only if a Tcl procedure is not invoked in-between to change MQMD values.