Author |
Message
|
rohank84 |
Posted: Wed Feb 04, 2009 3:35 am Post subject: number of message in text file |
|
|
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 |
|
 |
Vitor |
Posted: Wed Feb 04, 2009 3:42 am Post subject: Re: number of message in text file |
|
|
 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 |
|
 |
rohank84 |
Posted: Wed Feb 04, 2009 4:52 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Wed Feb 04, 2009 5:02 am Post subject: |
|
|
 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 |
|
 |
MQEnthu |
Posted: Thu Feb 05, 2009 12:52 am Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Thu Feb 05, 2009 2:26 am Post subject: |
|
|
 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 |
|
 |
MQEnthu |
Posted: Thu Feb 05, 2009 3:19 am Post subject: |
|
|
 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 |
|
 |
Gaya3 |
Posted: Thu Feb 05, 2009 5:51 am Post subject: |
|
|
 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 |
|
 |
dilse |
Posted: Thu Feb 05, 2009 10:08 am Post subject: |
|
|
 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 |
|
 |
rohank84 |
Posted: Tue Feb 10, 2009 11:28 pm Post subject: |
|
|
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 |
|
 |
|