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 » message flow reads only the first msg

Post new topic  Reply to topic Goto page 1, 2  Next
 message flow reads only the first msg « View previous topic :: View next topic » 
Author Message
RaviKrG
PostPosted: Tue Feb 10, 2009 4:00 am    Post subject: message flow reads only the first msg Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Hi I have a flow as MQInput --> Compute --> MQOutput

this just converts the xml to csv

it contains the message set.

now this just gives only the first record in output

input msg is
-------------
<OutputMSG>
<CustomerDetails>
<FirstName>Sandra</FirstName>
<LastName>Postlethwaite</LastName>
</CustomerDetails>
<Book>
<Title>Sitting Pretty</Title>
<Author>Tim Gordon</Author>
</Book>
<CustomerDetails>
<FirstName>Sandra</FirstName>
<LastName>Postlethwaite</LastName>
</CustomerDetails>
<Book>
<Title>Sitting Pretty</Title>
<Author>Tim Gordon</Author>
</Book>
</OutputMSG>

output i get is
-----------------
Sandra,Postlethwaite,7 Mycenae Street,Sitting Pretty,Tim Gordon,Hamble and Bursledon,1976-05-23T01:00:00

Now in the message set I have put the MAX Occur of CustomerDetails and Book elements as -1 (unbounded)

is this right or I need to check something more ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 10, 2009 4:03 am    Post subject: Re: message flow reads only the first msg Reply with quote

Grand High Poobah

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

RaviKrG wrote:
is this right


No

RaviKrG wrote:
I need to check something more ?


I don't know about check, you might want to review the documentation & think about what's happening a little.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Tue Feb 10, 2009 4:28 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

I can not tell exactly what changes to make to the message definiton with out looking at it..However you have to set the max. occurance of an element to -1 (or number of repetation) if it is repeating...
And hope you have implemented the looping in the ESQL to map all the records in the input.
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Tue Feb 10, 2009 4:36 am    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Sorry Vitor;

I dont know what happened to the system, the session has timed out when I refreshe I found the post as double.

I was just to update the administrators to close the new post as this was doubled.

Sorry again.

But about the reply :

do you mean to say "NO" as to we need not put MAX OCCUR to -1 or you meant something else.


Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 10, 2009 4:44 am    Post subject: Reply with quote

Grand High Poobah

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

RaviKrG wrote:
do you mean to say "NO" as to we need not put MAX OCCUR to -1 or you meant something else.


I meant it's clearly not right as it's giving the wrong result. There's a fairly obvious issue which you may or may not have addressed, given the limited information in your original post.

You don't mention what the Compute node is doing, posted any code, said what you've already done to try to resolve the problem, what happened when you tried this possible solution or indeed anything much past "I tried this, it didn't work first time, help me".

As a bare minimum we're likely to suggest things you've already tried which is a waste of your time and ours. Or documentation references you've already looked at and not found helpful.

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 10, 2009 4:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You haven't posted nearly enough information for anyone to give you a reasonable answer.

For one, your output message contains more data than your input message, so either you have not posted the correct input message or your flow does more than just transform the input message from XML to CSV.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Feb 10, 2009 5:16 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I hope that you have already have done one of the following:
- Attach the debugger to your flow, and step through the nodes/ESQL
or
- Detach the debugger
- Insert Trace nodes into your flow
- Take a user trace

These are the standard tools provided by IBM for debugging message flows. They do work.
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Tue Feb 10, 2009 9:40 pm    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Thanks Guys for your help.

I will get back to you once I am done with more work to this issue.

mqjeff : sorry for the input, input has the 3 fields deleted (i was trying to check something else)

kimbert I used the trace node and got a file as (this is on solaris)

BRK.58dd6a5b-1f01-0000-0080-ac35573246f4.userTrace.bin.1

Now I used the link http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac04840_.htm

but i did not get for the "mqsireadlog" any thing you would like to update on this.
Back to top
View user's profile Send private message
namakkal
PostPosted: Tue Feb 10, 2009 10:38 pm    Post subject: Re: message flow reads only the first msg Reply with quote

Novice

Joined: 06 Feb 2009
Posts: 19

RaviKrG wrote:
Hi I have a flow as MQInput --> Compute --> MQOutput

this just converts the xml to csv

it contains the message set.

now this just gives only the first record in output

input msg is
-------------
<OutputMSG>
<CustomerDetails>
<FirstName>Sandra</FirstName>
<LastName>Postlethwaite</LastName>
</CustomerDetails>
<Book>
<Title>Sitting Pretty</Title>
<Author>Tim Gordon</Author>
</Book>
<CustomerDetails>
<FirstName>Sandra</FirstName>
<LastName>Postlethwaite</LastName>
</CustomerDetails>
<Book>
<Title>Sitting Pretty</Title>
<Author>Tim Gordon</Author>
</Book>
</OutputMSG>

output i get is
-----------------
Sandra,Postlethwaite,7 Mycenae Street,Sitting Pretty,Tim Gordon,Hamble and Bursledon,1976-05-23T01:00:00

Now in the message set I have put the MAX Occur of CustomerDetails and Book elements as -1 (unbounded)

is this right or I need to check something more ?


Are you using a While loop to map all the repeating elements?? If not it will map only the first element. Please send a Input with different values for CustomerDetails and Book so that we can know which one is getting mapped.

Reg
sathish
Back to top
View user's profile Send private message Send e-mail
RaviKrG
PostPosted: Wed Feb 11, 2009 1:15 am    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Apologies for late reply, busy with little work

Well this flow is taking only the first msg .

I tried to use the trace node and got a file on my solaris machine as BRK.58dd6a5b-1f01-0000-0080-ac35573246f4.userTrace.bin.1 Can anybody tell how to format this to read this file. tried all possible means but could not proceed for this.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 11, 2009 1:24 am    Post subject: Reply with quote

Grand High Poobah

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

RaviKrG wrote:
Can anybody tell how to format this to read this file.


With the facilities provided

RaviKrG wrote:
tried all possible means but could not proceed for this.


Did that include reading the infocenter? The link you yourself posted earlier? What means were all the possible ones? If we assume you've already used all the techniques described then how can we possibly suggest anything new? Or anything that will help as you've not given any information on what went wrong when you tried them.

I've said before that simply posting "tried to do this, it went wrong, help me" does not advance the situation. If you've tried something and it didn't work tell us so we a) don't suggest it again and/or b) point out what you've done wrong.

Reread the infocentre. Unless you're too busy not posting your code and not answering the questions asked earlier in this thread?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Thu Feb 12, 2009 3:29 am    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Hi, Sorry for troubling.

I tried this with the toolkit debugger today. let me give all the points so that I can put my point well

message set
---------------
<OutputMSG>
<CustomerDetails>
<FirstName></FirstName>
<LastName></LastName>
<Address></Address>
</CustomerDetails>
<Book>
<Title></Title>
<Author></Author>
<Publisher></Publisher>
<Date></Date>
</Book>
</OutputMSG>

OutputMSG, CustomerDetails and Book --> Comp type
Rest are of string type.

Flow
-----

MQinput node --> comput node --> MQoutput node

MQinput node :
-------------
Message Domain : MRM
Message Set : XMLTOCSV
Message Type : OutputMSG
Message Format : XML1

comput node :
--------------

SET OutputRoot.Properties.MessageFormat = 'Text_CSV';

Now my input is:
---------------------
<OutputMSG>
<CustomerDetails>
<FirstName>Sandra</FirstName>
<LastName>Postlethwaite</LastName>
<Address>7 Mycenae Street</Address>
</CustomerDetails>
<Book>
<Title>Sitting Pretty</Title>
<Author>Tim Gordon</Author>
<Publisher>Hamble and Bursledon</Publisher>
<Date>1976-05-23T01:00:00</Date>
</Book>
<CustomerDetails>
<FirstName>JAggi</FirstName>
<LastName>Meher</LastName>
<Address>USA</Address>
</CustomerDetails>
<Book>
<Title>MY Love</Title>
<Author>Not Me</Author>
<Publisher>Not Her</Publisher>
<Date>1976-05-23T01:00:00</Date>
</Book>
</OutputMSG>

Now on using the debugger after the compute node is processed I get in the "Variable Section" as
Message -> MRM -> CustomerDetails(both CustomerDetails tag values) and Book (both Book tag values)

Problem :
-------
when I check the output queue I get only one messages

Sandra,Postlethwaite,7 Mycenae Street,Sitting Pretty,Tim Gordon,Hamble and Bursledon,1976-05-23T01:00:00
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 12, 2009 3:34 am    Post subject: Reply with quote

Grand High Poobah

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

RaviKrG wrote:
SET OutputRoot.Properties.MessageFormat = 'Text_CSV';


Is this ALL the code?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Feb 12, 2009 5:25 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

If I understand you correctly, you are using the same message set with two physical format XML1 and 'Text_CSV'. If so, then your ESQL implementation is correct; you just have to do
SET OutputRoot.Properties.MessageFormat = 'Text_CSV';
after doing copy entire message.
or you can just RCD node and reset the MessageFormat to 'Text_CSV'.

The reason why you are getting only the first record might be because of not mentioning the repetation of the complex types properly. As I see your message the CustomerDetails and Book are repeating in pair and OutMessage is at the messag level (root element of xml message). You create Local Group of type sequence and package CustomerDetails and Book under them. Set the repetation of Group to -1 and repeating element delimiter to <CR><LF> assuming you want the second one in next line. Also set TDS properties of the Local Group properly -Data Elelment seperation as all element delimiter and delimiter as ','.

For this setting you would get the output as:

Sandra,Postlethwaite,7 Mycenae Street,Sitting Pretty,Tim Gordon,Hamble and Bursledon,1976-05-23T01:00:00
JAggi,Meher,USA,MY Love,Not Me,Not Her,1976-05-23T01:00:00
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Sun Feb 15, 2009 12:12 pm    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Sorry for late reply.

Thanks MQEnthu, I applied the changes accordingly and I got the proper output.

But still I would like to get some more clarification in this thread as I did experiment some more thing here:

1) this question may not be a proper one but still I would like to know which is better creating the groups and making the changes or having a ESQL code in loop to get the out put. (I can say that when the output is just to convert the physical setup ie xml to csv then what i did should be a good idea)

2) As said by kimbert I did use the trace node but I think I will have to get some of the things cleared about the trace node

when I used the trace node and when I changed the property of destination as :
1)Local error Log : I just got one sentence in the system log which did not give any idea
2)user trace : I got a file named as BRK.58dd6a5b-1f01-0000-0080-ac35573246f4.userTrace.bin.1 but I am not sure how to read this file.
3)File : and then I gave the file path as /export/home/wbimb (my broker is on solaris and toolkit is windows) but after running the flow I did not get any file in the above path.

well regarding the trace node do I need to set any other properties ?

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » message flow reads only the first msg
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.