Author |
Message
|
anoobrocks |
Posted: Mon Oct 04, 2010 8:38 am Post subject: To use propogate inside a loop? |
|
|
Newbie
Joined: 28 Sep 2010 Posts: 8
|
Hi,
set a=1;
while a<=10 do
.
..
...
propagate to terminal 'out1';
set a=a+1;
end while;
Can i know the reason for messages moving to DLQ. As far as i know we can use propagate inside a loop to send multiple messages. Please suggest me a solution if i'm wrong anywhere.
Thank you. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 04, 2010 9:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Nothing you have provided says that this code will cause messages to go to any queue, much less the DLQ.
More information == better answers. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 04, 2010 9:13 am Post subject: Re: To use propogate inside a loop? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anoobrocks wrote: |
Can i know the reason for messages moving to DLQ. |
Because wherever they go after they've been propagated leads to a DLQ. There's nothing in your post that indicates the propagate has anything to do with anything. For example, if the next node down is an MQOutput node that points to a remote queue, and the target of that queue is full, the message will go to that queue manager's DLQ. Nothing to do with propagate or the broker.
anoobrocks wrote: |
As far as i know we can use propagate inside a loop to send multiple messages. |
It's pretty much the only use.
anoobrocks wrote: |
Please suggest me a solution if i'm wrong anywhere. |
Well posting some more information (like the reason code on the DLH) would be nice. Also something about the topology (i.e. where the messages go after this) would help.
As well as an assurance you're managing the message headers properly on propagate. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
anoobrocks |
Posted: Mon Oct 04, 2010 9:17 am Post subject: |
|
|
Newbie
Joined: 28 Sep 2010 Posts: 8
|
Say.. I am trying to fetch around 10 records from table, do some logic and then propogate to the output Q... I need to do the same process again and again for the next ten records.. like wise nearly 10 times i need to do it. all the 10 messages moving to same output Q for 1 transaction.
So i tried using a loop say..
set a=1;
while a<=10 do
.
..
...
propagate to terminal 'out1';
set a=a+1;
end while;
I am just using an existing code for some enhansement work.. which was propagating first 10 records alone as 1 output message. Now i need to use it multiple times..
My flow is like mqinput--compute--mqoutput node.
The reason in DLH - MQFB_APPL_FIRST
Last edited by anoobrocks on Mon Oct 04, 2010 9:26 am; edited 2 times in total |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 04, 2010 9:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anoobrocks wrote: |
Please correct me if i am wrong anywhere...  |
Where you're wrong is in repeating your original problem rather than giving us any additional information!
As both I & my most worhty associate have said, there's nothing about a queue in that code. So it's impossible to determine how your messages are getting to any queue never mind a dead letter one.
Either answer the questions you're being asked, or accept you're going to get very limited help from us. Unless a psychic turns up.
And I'm psychotic not psychic. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 04, 2010 9:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anoobrocks wrote: |
My flow is like mqinput--compute--mqoutput node.
The reason in DLH - MQFB_APPL_FIRST |
Don't add missing information by editing - make a new post.
If you look up MQFB_APPL_FIRST you'll notice it's reserved for application error. So what it means here is that your ESQL is abending.
Either take a user trace or use the debugger to catch the exception tree. It's a process commonly known as "problem resolution" and is often the result of changing code. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ajit1981 |
Posted: Mon Oct 04, 2010 9:24 pm Post subject: |
|
|
Apprentice
Joined: 09 Apr 2010 Posts: 41 Location: Bangalore, Inida
|
Are you using two terminal(out and out1) from Compute node ? I think your out1 terminal is not connted to MqOutput node. either connect out1 terminal to MqOutput node or change your esql coding to
propagate to terminal 'out'; |
|
Back to top |
|
 |
zpat |
Posted: Mon Oct 04, 2010 11:38 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Try using the options DELETE NONE FINALIZE NONE on the propagate. |
|
Back to top |
|
 |
viswanath |
Posted: Wed Oct 06, 2010 5:10 pm Post subject: |
|
|
Apprentice
Joined: 09 Jun 2005 Posts: 33
|
Use PROPAGATE with DELETE NONE.Also make sure you have RETURN FALSE at the end of the module. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 06, 2010 6:29 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There's no direct evidence that DELETE NONE is applicable here. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Oct 06, 2010 9:00 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mqjeff wrote: |
There's no direct evidence that DELETE NONE is applicable here. |
There's also no direct evidence that FINALIZE NONE is applicable here ... (or even that RETURN FALSE is applicable here).
By default, OutputRoot (and any other Output trees) are deleted after a PROPAGATE statement, so it's useful to add statements to rebuild them as needed, within the loop.
"RETURN TRUE" implies an additional PROPAGATE statement; "RETURN FALSE" does not. |
|
Back to top |
|
 |
anoobrocks |
Posted: Thu Oct 07, 2010 9:10 am Post subject: |
|
|
Newbie
Joined: 28 Sep 2010 Posts: 8
|
zpat wrote: |
Try using the options DELETE NONE FINALIZE NONE on the propagate. |
Yes it worked when i used Delete none. Thanks a lot. Sorry for the delay in reply. |
|
Back to top |
|
 |
|