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 » Sorting a repeating structure.

Post new topic  Reply to topic
 Sorting a repeating structure. « View previous topic :: View next topic » 
Author Message
tbt102
PostPosted: Tue Jun 24, 2003 3:01 am    Post subject: Sorting a repeating structure. Reply with quote

Apprentice

Joined: 21 Apr 2003
Posts: 28

Hi All,

I have a message that has a repeating structure. I need to sort the repeating structure on 4 elements before I can begin processing. Also I'm using the CWF layer.

Does WMQI have a built in sort facility?

Thanks in advance for any help.
Back to top
View user's profile Send private message
Craig B
PostPosted: Tue Jun 24, 2003 3:18 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Unfortunately the WMQI product does not have any kind of sort facility that is built into the product. You can either write your own recursive ESQL procedure or function to perform a bubble sort etc. Or you can implement a user plugin node that can perform a sort on the message tree objects.
_________________
Regards
Craig
Back to top
View user's profile Send private message
tbt102
PostPosted: Tue Jun 24, 2003 3:48 am    Post subject: Reply with quote

Apprentice

Joined: 21 Apr 2003
Posts: 28

Thanks Craig.

Does anyone have any experience with writing recursive ESQL procedures or functions to perform a sort of any kind?

If so would you please share your experience and or code?

Thanks in advance for any help.
Back to top
View user's profile Send private message
drajib
PostPosted: Tue Jun 24, 2003 4:47 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Just sharing my views

Sorting is an activity that databases are inherently good at. I'm not sure whether you would gain any kind of performance benefit implementing this within WMQI via recursive eSQL function calls. (I've a hunch that you would need to use EVALs which are dynamic & slow).

Perhaps - introducing a table, inserting records, and ultimately selecting in an ordered manner (Oracle - ORDER BY clause) would be easier in terms of maintenance (Think about if somebody has to change the order in future by modifying eSQL!)

Others, please share your knowledge.
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Jun 24, 2003 4:57 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Database calls inherently have a performance issue. Also depending on the size of the database you have tuning issues on the database.
Why add an additional component to your ESQL ?
If the no. of records are less it may not be advisable to use a DB, but for sorting a large no. of records I think that this may be a good option.

Does char comparison work in ESQL ?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
drajib
PostPosted: Tue Jun 24, 2003 5:28 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Yes! 'Character's are evaluated lexically within eSQL. Comparing two Character variables should work. However, writing the eSQL code, makes the solution tied to a particular message structure, whereas introducing database makes sorting generic.

Though I believe ultimately the solution would be driven by client environment

Best regards
Back to top
View user's profile Send private message
Craig B
PostPosted: Tue Jun 24, 2003 5:28 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

You can use recursive function calls in ESQL without using the EVAL statement. However, as a previous append points out there is no string comparison function that can compare two strings alphabetically. Again, you would need to write your own ESQL function to do this and have to code in such issues and mismatch of lengths and none alphanumeric characters. I do have an example of a tree sort that uses numeric data such as account numbers. However, I would consider how often you are going to use this and would investigate the database sort possibility or writing a basic plugin which implements a programming language sort from C or Java.
_________________
Regards
Craig
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 » Sorting a repeating structure.
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.