ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Retrieving MQ message length in a compute node of a WMB flow

Post new topic  Reply to topic
 Retrieving MQ message length in a compute node of a WMB flow « View previous topic :: View next topic » 
Author Message
Dennis
PostPosted: Wed Jul 14, 2010 8:10 am    Post subject: Retrieving MQ message length in a compute node of a WMB flow Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

I am using WMB V6.1

How do I retreive the MQ message length in a compute node?

My flow has an MQInput node that goes to a compute node. I want to know what the MQ message length is in my compute node.

I have tried set a variable with the LENGTH(InputBody) with no luck
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 14, 2010 8:27 am    Post subject: Re: Retrieving MQ message length in a compute node of a WMB Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Dennis wrote:
I want to know what the MQ message length is in my compute node.


Why? What's the requirement? What value does this knowledge have to you?

(There may be other, better ways to achieve this)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Dennis
PostPosted: Wed Jul 14, 2010 9:43 am    Post subject: Retrieving MQ message length in a compute node of a WMB Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

I have a flow that needs to loop thru this message but it can be any length. I need to know when I am done. It uses a CWF message set importing a COBOL copybook. The message contains mutiple segments that match the 05 level of the copybook. But There is no depends on clause. It is unlimited.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 14, 2010 10:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Why not just loop round the elements in ESQL? Why do you need the message length?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Dennis
PostPosted: Wed Jul 14, 2010 10:13 am    Post subject: Retrieving MQ message length in a compute node of a WMB Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

Correct But how would I know when do stop my LOOP?

I have a message set of elements and the group total 200 bytes. The message contains 'N' number of those 200 byte groups.

So how would I using the message set element names move first occurence of element to an output then bump to the next 200 group in the message using the same message set group element names?
Back to top
View user's profile Send private message
Dennis
PostPosted: Wed Jul 14, 2010 10:16 am    Post subject: Retrieving MQ message length in a compute node of a WMB Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

I do not want to have to code in the message set an OCCURS depends on some other input field in the message gining me that number. I want to just bump thru each 200 byte segment of the message using the message set.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 14, 2010 10:28 am    Post subject: Re: Retrieving MQ message length in a compute node of a WMB Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Dennis wrote:
Correct But how would I know when do stop my LOOP?


Because that's the number of elements in the message.

Dennis wrote:
I have a message set of elements and the group total 200 bytes. The message contains 'N' number of those 200 byte groups.


I get that.

Dennis wrote:
So how would I using the message set element names move first occurence of element to an output then bump to the next 200 group in the message using the same message set group element names?


It sounds like there's a problem with your message set. If it only describes the 200 bytes you're working with then there's your problem. It should describe the entire message (the clue's in the name! ). If it does that (as it should) then you'll be able to loop round the groups until you run out (which WMB will tell you).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Dennis
PostPosted: Wed Jul 14, 2010 10:36 am    Post subject: Retrieving MQ message length in a compute node of a WMB Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

No. Here is an example of what I am saying.

Message set has 5 elements in it

All_Elements Min Occurs 1 Max Occurs -1
Element1 Length 1
Element2 Length 1
Element3 Length 1
Element4 Length 1
Element5 Length 1


My message is something like this:

12345123451234512345123451234512345

or this
12345

or this
123451234512345


I need to move each 1 to an out 1, each 2 to an out 2, each 3 to and out 3, etc.

How do I loop thru each 1 thru 5 segment if I do not know how many 1-5 occurs? Like on the first message it occurs 7 times. the next message only once the next message 3 times
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 14, 2010 10:40 am    Post subject: Re: Retrieving MQ message length in a compute node of a WMB Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Dennis wrote:
How do I loop thru each 1 thru 5 segment if I do not know how many 1-5 occurs? Like on the first message it occurs 7 times. the next message only once the next message 3 times


Because the broker knows that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 14, 2010 10:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Examine the FOR and WHILE loop constructs available in ESQL. Particularly consider the LASTMOVE function.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Retrieving MQ message length in a compute node of a WMB flow
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.