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 » Need Support

Post new topic  Reply to topic
 Need Support « View previous topic :: View next topic » 
Author Message
siva1431202
PostPosted: Sun May 08, 2011 8:33 pm    Post subject: Need Support Reply with quote

Novice

Joined: 04 May 2011
Posts: 20

Hi Could any one please support me with java compute node. i had the following code in esql. How can i write this in Java compute node.this code is for duplicate removal.

DECLARE Y INTEGER;
DECLARE Z INTEGER;
SET Y = 1;
SET Z = CARDINALITY(InputRoot.XMLNSC.Employee.Emp[]);
WHILE Y < Z DO
DECLARE cnt INTEGER;
SET cnt = SELECT COUNT (*) FROM InputRoot.XMLNSC.Employee.Emp[].empid AS I WHERE I.empid = InputRoot.XMLNSC.Employee.Emp[Y].empid ;
IF cnt > 1 THEN
DECLARE ref REFERENCE TO InputRoot.XMLNSC.Employee.Emp[Y].empid;
Detach ref;
--Detach
END IF;
SET Y = Y +1;
END WHILE;
SET OutputRoot.XMLNSC.Employee.Emp = InputRoot.XMLNSC.Employee.Emp;


using empid i am removing duplicates.
In the same way i want to sort using Firstname in java compute node.
Back to top
View user's profile Send private message
siva1431202
PostPosted: Sun May 08, 2011 10:14 pm    Post subject: Reply with quote

Novice

Joined: 04 May 2011
Posts: 20

Is anone there to help me out of this?
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Sun May 08, 2011 10:25 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

This is not a IBM MQ support site. We are all volunteers here having our jobs to do or, even if not at job, still other hobbies to do or family or whatever. In addition, to me it looks like you are looking for free consultant work here. Please keep in mind that there are people making their living of the knowledge you request here (impatiend) for free.

just my 2 cents.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
siva1431202
PostPosted: Sun May 08, 2011 10:58 pm    Post subject: Reply with quote

Novice

Joined: 04 May 2011
Posts: 20

ok not a problem. i am asking to share the knowledge that's it but i am just asking if possible help me in changing the syntax. I had the logic with me and i am asking just the syntax.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Mon May 09, 2011 1:40 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

well, most programming languages have some kind of documentation that holds the syntax.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 09, 2011 1:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You would use Xpath expressions instead of the ESQL Select statement.

Please also note that your ESQL as written is not terribly well written ESQL.

If you are looking to switch to using Java to increase the performance, you could increase the performance instead by switching to using REFERENCE variables and not using CARDINALITY or [Y] expressions.
Back to top
View user's profile Send private message
siva1431202
PostPosted: Mon May 09, 2011 3:41 am    Post subject: Reply with quote

Novice

Joined: 04 May 2011
Posts: 20

Ok . Thank you. Does my ESQL Work?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 09, 2011 4:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

siva1431202 wrote:
Ok . Thank you. Does my ESQL Work?


I certainly haven't tested it.

I'm sure if it didn't work, you would know that much better than I do.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 09, 2011 6:51 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
siva1431202 wrote:
Ok . Thank you. Does my ESQL Work?


I certainly haven't tested it.

I'm sure if it didn't work, you would know that much better than I do.




Though I can see at least 1 possible problem with it.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Need Support
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.