Friday, August 21, 2015

destination list MQ

You need to set the MQ Output Node into "Destination List" mode using the "Destination Mode" property in the Advanced Tab on the node.
You can then set the local environment values OutputLocalEnvironment.Destination.MQ.DestinationData[X].queueName = <queueName>
For example take a look at the function given in Infocenter topic http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac16862_.htm
 CREATE PROCEDURE addToMQDestinationList(IN LocalEnvironment REFERENCE, IN newQueue char) BEGIN
  /*******************************************************************************
  * A procedure that adds a queue name to the MQ destination list in the local environment.
  * This list is used by an MQOutput node that has its mode set to Destination list.
  *
  * IN LocalEnvironment: the LocalEnvironment to be modified. 
  * IN queue: the queue to be added to the list
  *
  *******************************************************************************/
DECLARE I INTEGER CARDINALITY(LocalEnvironment.Destination.MQ.DestinationData[]);
        IF I = 0 THEN
            SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = newQueue;
        ELSE
            SET OutputLocalEnvironment.Destination.MQ.DestinationData[I+1].queueName = newQueue;
        END IF;
    END;

No comments:

Post a Comment