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 » number of message in text file

Post new topic  Reply to topic
 number of message in text file « View previous topic :: View next topic » 
Author Message
rohank84
PostPosted: Wed Feb 04, 2009 3:35 am    Post subject: number of message in text file Reply with quote

Centurion

Joined: 31 Dec 2008
Posts: 109

Hi

i need to find out the number of messages in a file .

I have a file where there will number of messages seperated by a $ sign. I want to know the number of such messages and the message content as well....th en i have to insert the message in database ...is there a kind of FOR loop in esql ....

how do i do it .....please help
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 04, 2009 3:42 am    Post subject: Re: number of message in text file Reply with quote

Grand High Poobah

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

rohank84 wrote:
is there a kind of FOR loop in esql ....


Yes - it's in the ESQL manual, under FOR. Look it up. You can either use it directly or in conjuction with the cardinality function.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rohank84
PostPosted: Wed Feb 04, 2009 4:52 am    Post subject: Reply with quote

Centurion

Joined: 31 Dec 2008
Posts: 109

hi can u give me the link of the esql manual ....

how wud i get the number of messages and the content of each messages in a particular file
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 04, 2009 5:02 am    Post subject: Reply with quote

Grand High Poobah

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

rohank84 wrote:
hi can u give me the link of the esql manual ....


It's on the IBM site, in the WMB InfoCenter, with the rest of the documentation. Which you are of course refering to on a daily basis for fear of asking innane and pointless questions in a public forum. Links to it have also been posted in here - The Search Feature Is Your Friend.

rohank84 wrote:
how wud i get the number of messages and the content of each messages in a particular file


By using one of the 2 methods in my previous post, and examining the messages in the usual way.

There are a number of feasible soultions to your very simple requirement, so you must select the one that suits your needs (and your site standards) best. Only you can make that determination because only you among us know your site and only you among us are paid to know.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Feb 05, 2009 12:52 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Hope you have created the message set to parse the incoming message so as to read all the records seperated by delimiter $ in the file.


____________________________________________________
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Feb 05, 2009 2:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Hope you have created the message set to parse the incoming message
If rohank84 simply wants to split up the incoming BLOB then it might be easier to do that using some ESQL. On the other hand, if rohank84 needs to parse the individual messages and work with the resulting message trees then he should certainly use a message set.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Feb 05, 2009 3:19 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Hi Kimbert,

Quote:

Yes - it's in the ESQL manual, under FOR. Look it up. You can either use it directly or in conjuction with the cardinality function.


Yes I agree with you. If he does not want to process the message he does not have to parse it. Though he will have to look for delimiter $ in ESQL to split the message if the message is not parsed (as I understand it is not fixed length).

____________________________________________
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Feb 05, 2009 5:51 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

if you know java, then use JCN to do the same.
where you can use linereader and all functions to get it done

it is up to you which one to use ESQL or JAVA
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
dilse
PostPosted: Thu Feb 05, 2009 10:08 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Apart from all the suggestions above, if you are using WMB V6.1, you can use FileInput node with the delimiter scenario.
Back to top
View user's profile Send private message
rohank84
PostPosted: Tue Feb 10, 2009 11:28 pm    Post subject: Reply with quote

Centurion

Joined: 31 Dec 2008
Posts: 109

hi guys ...sorry for the late reply ....i seperated the message by using the delimiter option in records and Element property ....so it gives me the messages seperated by $ sign ......thanks a ton guys ...
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 » number of message in text file
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.