A couple of comments/questions.

1)  You say that you want to propagate a single MQMD.MsgID to another
compute node...  Why not do all of the work in a single compute node?
It would be more efficient if you could, and from what I see it looks
like you may be able to since it appears that both tables are in the
same database.

2)  Have you checked the "Compute Mode" property on the "Advanced" tab
of the Compute Node?  That needs to be set to pass the LocalEnvironment
on to downstream nodes.

3)  You sample ESQL is not rebuilding all of the message headers.  Keep
in mind that the "Propagate" function will clear the entire message
tree.  The following is sample ESQL that I have successfully used with
the Propagate function:

-- Enter SQL below this line.  SQL above this line might be regenerated,
causing any modifications to be lost.

*** START OF CODE SAMPLE ***

--======================================================================
================================--
--
--
-- Declare and initialize variables for looping through each item.
--
--
--
--======================================================================
================================--
DECLARE I INTEGER;
DECLARE X INTEGER;
DECLARE Y INTEGER;
SET X = 1;
SET Y = CARDINALITY(InputBody."Order"."Item"[]);

WHILE X <= Y DO
        --
========================================================================
====================    --
        -- Since the PROPAGATE function will clear the output message
tree use the following loop to  --
        -- build the MQMD and other headers.
--
        --
========================================================================
====================    --
        SET I = 1;
        WHILE I < CARDINALITY(InputRoot.*[]) DO
                SET OutputRoot.*[I] = InputRoot.*[I];
                SET I=I+1;
        END WHILE;
        SET OutputRoot."XML"."ItemMsg"."Item" =
InputRoot.XML."Order"."Item"[X];
        PROPAGATE;
        SET X = X + 1;
END WHILE;
RETURN FALSE;

*** END OF CODE SAMPLE ***

Notice that I do not use the "Copy message headers" or the "Copy entire
message" options.  I am manually copying the headers for each message to
be propagated.

Sincerely,

Timm R Bryant


-----Original Message-----
From: MQSeries List [mailto:[EMAIL PROTECTED]] On Behalf Of Steven
Schorah
Sent: Friday, May 31, 2002 4:29 AM
To: [EMAIL PROTECTED]
Subject: MQSI 2.1 ESQL PROPAGATE functioning not working


Hi guys

Has anybody setup an MQSI 2.1 flow that uses the propogate function to
FAN out messages.

Our model is that we want to replay a number of MQ messages which have
been stored in an Oracle database as CLOB columns

The database consists of two tables
table1: MQMD.MsgId and replay indicator
table2: MQMD MsgId CLOB containing archived message

A trigger message kicks off the flow MQInput node passes control to a
compute node1 then runs a database query against table1 returning n rows
which need replaying.

At this point I want to progagate a single MQMD.MsgId to another compute
node2 which fetches the CLOB from table2 and passes data to MQOutput
node.

This is a pretty common scenario if you ever want to replay a set of
messages archived to a database.

My problem is that (if n rows returned by query on compute node1) after
the 1st propagate (message published ok) control returns to compute
node1 however the set of data retrieved from the database say n-1 rows
are not available within my PROPAGATE LOOP any more.

I have tried storing row data using the ENVIRONMENT tree
I have tried storing row data using InputLocalEnvironment tree I have
tried introducing another compute node0 prior to compute node1 to
perform the database select and storing row data in InputRoot resetting
OUT to IN within PROPAGATE loop.

Example PROPGATE loop shown below:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated,
causing any modifications to be lost.

DECLARE I INTEGER;
DECLARE J INTEGER;

SET I = CARDINALITY(Environment.MSGID.data[]);

IF I > 0 THEN
   SET J = 1;
   WHILE J <= I DO
         SET OutputRoot.BLOB.BLOB = Environment.MSGID.data[J];
         PROPAGATE;
         SET J = J + 1;
   END WHILE;
END IF;

RETURN FALSE;

All of these methods fail to retain the set of data stored in the
message tree, it seems that the propogate ZAPS the entire message tree.

Has anybody out there come across this problem or can anybody offer a
solution.

Appreciate any suggestions
Thanks
Steve




The information contained in this email message is intended only for use
of the individual or entity named above.  If the reader of this message
is not the intended recipient, or the employee or agent responsible to
deliver it to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please
immediately notify us by telephone (44-20 7618 2652), and destroy the
original message. Thank you.

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to