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 » IBM MQ Java / JMS » Issuing cmd commands from JavaComputeNode

Post new topic  Reply to topic
 Issuing cmd commands from JavaComputeNode « View previous topic :: View next topic » 
Author Message
tekt9
PostPosted: Fri Oct 05, 2012 5:16 am    Post subject: Issuing cmd commands from JavaComputeNode Reply with quote

Novice

Joined: 13 Aug 2012
Posts: 15

Hi...

I'm creating a flow which reads messages from a queue and saves it as a file.

Thansk to a suport pack(mo03) this can be done fairly easy, using a command line tool. I'm however having difficulties getting JavaComputeNode execute the command. Note that "qload" is from mo03

String write_to_file = "cmd /c qload -m "+qmgrName+" -I "+queueName+" -f "+OutPutFileName;

try {
Process pr = Runtime.getRuntime().exec(write_to_file);

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

It works when I execute it as a java project from eclipse, but when it's in a JavaComputeNode it messes things up.

Have any one you experience with executing cmd commands from a JavaComputeNode?


/Tharani
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Oct 05, 2012 5:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why would you use a javaCompute node when you can use an MQGet and a FileOutput node instead?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 05, 2012 6:33 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
Why would you use a javaCompute node when you can use an MQGet and a FileOutput node instead?



_________________
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 » IBM MQ Java / JMS » Issuing cmd commands from JavaComputeNode
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.