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 » Remove 2nd duplicate field not whole line on a message tree

Post new topic  Reply to topic
 Remove 2nd duplicate field not whole line on a message tree « View previous topic :: View next topic » 
Author Message
Charlesn1
PostPosted: Tue Oct 05, 2010 3:05 am    Post subject: Remove 2nd duplicate field not whole line on a message tree Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

* please do not use *

Last edited by Charlesn1 on Thu Oct 14, 2010 7:04 am; edited 1 time in total
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 05, 2010 3:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

use [ c o d e ] tags.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Oct 05, 2010 3:13 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks for sharing that code snippet.
Back to top
View user's profile Send private message
Charlesn1
PostPosted: Thu Oct 14, 2010 12:55 am    Post subject: code tags Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

could you please show me an example
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 14, 2010 1:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Example of what? Please state your problem clearly, accurately and fully.
Back to top
View user's profile Send private message
Charlesn1
PostPosted: Thu Oct 14, 2010 2:04 am    Post subject: comparing lines till i find duplicates Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

i needed to compare all lines till i find duplicates
for eg 1 to 1 , 1 to 2 , 1 to 3
2 to 3 , 2 to 4
3 to 4 , 3 to 5

etc
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 14, 2010 2:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please describe your data, and then tell us exactly what 'duplicate' means.
This forum is provided for free, but it is not a consultancy service. We expect you to take some of *your* time to explain *your* problem clearly. Otherwise you end up wasting *our* time, which makes it less likely that we will want to help you.

No more help until you play by the rules.
Back to top
View user's profile Send private message
Charlesn1
PostPosted: Thu Oct 14, 2010 3:01 am    Post subject: Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

i have this file as input, i need to compare each line to the next till i find duplicates see the bold text ,

11/10/10 - 18:59:19:15|ZMO00842|Title: 19:30 The Suite Life On Deck(Last) The Amazing Race, O|00:08:00:00|00:08:30:00|00:00:30:00|
11/10/10 - 18:59:50:00|CE55258A|STA/010/001/E/T|00:28:52:13|00:29:02:13|00:00:10:00|abcd|2341861|
11/10/10 - 18:59:51:00|DVE Key|DVE Key|00:00:00:00|00:00:08:00|00:00:08:00|
11/10/10 - 21:59:29:15|ZMO00942|Tom: 19:30 The Big Bang Theory, 20:00 Solving It, 20:31 Special|00:09:00:00|00:09:20:00|00:00:20:00|
11/10/10 - 21:59:50:00|CE55258A|STA/010/001/E/T|00:28:52:13|00:29:02:13|00:00:10:00|abcd|2341861|

expected
11/10/10 - 18:59:19:15|ZMO00842|Title: 19:30 The Suite Life On Deck(Last) The Amazing Race, O|00:08:00:00|00:08:30:00|00:00:30:00|
11/10/10 - 18:59:50:00|CE55258A|STA/010/001/E/T|00:28:52:13|00:29:02:13|00:00:10:00|abcd|2341861|
11/10/10 - 18:59:51:00|DVE Key|DVE Key|00:00:00:00|00:00:08:00|00:00:08:00|
11/10/10 - 21:59:29:15|ZMO00942|Tom: 19:30 The Big Bang Theory, 20:00 Solving It, 20:31 Special|00:09:00:00|00:09:20:00|00:00:20:00|
[b]11/10/10 - 21:59:50:00|CE55258A|STA/010/001/E/T|00:28:52:13|00:29:02:13|00:00:10:00|
Back to top
View user's profile Send private message
Charlesn1
PostPosted: Thu Oct 14, 2010 3:24 am    Post subject: data Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

11/10/10 - 21:59:50:00|CE55258A|STA/010/001/E/T|00:28:52:13|00:29:02:13|00:00:10:00|abcd|2341861|

|Date and Time|clipid|cliptitle|duration|userdata|
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 14, 2010 3:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So which piece is the unique key?

You could create a ROW variable that held a child for each unique key, and if you found that such a child existed for the current row, you could then delete the current row.

You could potentially even have that ROW variable hold a reference to the full row.
Back to top
View user's profile Send private message
Charlesn1
PostPosted: Thu Oct 14, 2010 4:06 am    Post subject: userData is the main unique field Reply with quote

Newbie

Joined: 21 Sep 2010
Posts: 6

* please do not use *

Last edited by Charlesn1 on Thu Oct 14, 2010 6:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 14, 2010 4:44 am    Post subject: Re: userData is the main unique field Reply with quote

Grand High Poobah

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

Charlesn1 wrote:
here is the code i tried, please check


Not until you start reading what people are posting!

Specifically:

- using [c o d e] tags when posting code
- answering questions asked with relevent information (like describing the key fields)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Oct 14, 2010 5:19 am    Post subject: Re: userData is the main unique field Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Charlesn1 wrote:
here is the code i tried, please check


When you ask us to check it? Are you asking us to try it in our own environments and see what happens? Maybe then update the code and send it back to you?

What happened when you "checked" it?

My comments:
1) it looks like it wont achieve your goal in its current form.
2) it looks like the final solution may end up being a quadratic.

Hope that helps
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 » Remove 2nd duplicate field not whole line on a message tree
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.