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 » General IBM MQ Support » SOLVED: Can't get batch file to run via MQ Trigger

Post new topic  Reply to topic
 SOLVED: Can't get batch file to run via MQ Trigger « View previous topic :: View next topic » 
Author Message
gdiehl
PostPosted: Wed Oct 17, 2007 5:49 am    Post subject: SOLVED: Can't get batch file to run via MQ Trigger Reply with quote

Novice

Joined: 03 Oct 2007
Posts: 15
Location: Binghamton, NY

Hello -

I'd appreciate any suggestions regarding a problem I'm having getting a batch file to execute via the MQ Trigger Monitor. Thanks to the other tips I've read in this forum, I'm close, but no cigar yet.

I think my queues & trigger monitor are fine because the triggered process does start when I put a message into the application queue. The bat file I'm using for debug is specified in the Process Definition as:
"START /B C:\PROGRA~1\dummybat.bat"

C:\PROGRA~1\dummybat.bat consist of some simple DOS commands:

@echo off
DIR >C:\DOCUME~1\gdiehl\MYDOCU~1\MyProgDir.txt
CD C:\PROGRA~1\Java
CD C:\DOCUME~1\gdiehl
COPY MYDOCU~1\dummyfile.txt MYDOCU~1\dummyfilenew.txt

When the process fires, a new CMD.EXE process is created and the Current Directory for that process gets set to C:\PROGRA~1\Java. But that's where it hangs. Moreover, neither of my test output files, MyProgDir.txt or dummyfilenew.txt are created

Any thoughts ?

Thank you.

Gary
_________________
Keep 'em in the short grass

Gary


Last edited by gdiehl on Tue Oct 23, 2007 5:29 am; edited 1 time in total
Back to top
View user's profile Send private message
tleichen
PostPosted: Wed Oct 17, 2007 12:44 pm    Post subject: Re: Can't get batch file to run via MQ Trigger Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

gdiehl wrote:
Hello -

I'd appreciate any suggestions regarding a problem I'm having getting a batch file to execute via the MQ Trigger Monitor. Thanks to the other tips I've read in this forum, I'm close, but no cigar yet.

I think my queues & trigger monitor are fine because the triggered process does start when I put a message into the application queue. The bat file I'm using for debug is specified in the Process Definition as:
"START /B C:\PROGRA~1\dummybat.bat"

C:\PROGRA~1\dummybat.bat consist of some simple DOS commands:

@echo off
DIR >C:\DOCUME~1\gdiehl\MYDOCU~1\MyProgDir.txt
CD C:\PROGRA~1\Java
CD C:\DOCUME~1\gdiehl
COPY MYDOCU~1\dummyfile.txt MYDOCU~1\dummyfilenew.txt

When the process fires, a new CMD.EXE process is created and the Current Directory for that process gets set to C:\PROGRA~1\Java. But that's where it hangs. Moreover, neither of my test output files, MyProgDir.txt or dummyfilenew.txt are created

Any thoughts ?

Thank you.

Gary
I find your script odd, in that there are two CD commands together, which would make the first one redundant, as you have it coded. Are you sure that the second one should not be CD DOCUM~1\gdiehl? In which case, why not just code it as one command?

If not, what is the first CD command doing for you?

You also can put the full name, i.e., C:\Program Files\..., etc., rather than C:\Progra~1\....
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
gdiehl
PostPosted: Fri Oct 19, 2007 4:44 am    Post subject: Can't get batch file to run via MQ Trigger -- Fixed Reply with quote

Novice

Joined: 03 Oct 2007
Posts: 15
Location: Binghamton, NY

Hi -

The pasted batch file was just to see how far the things executed. By going into the process monitor after the job hung and looking at the current directory, I could see whether the batch file started at all, and if so, how far it got. There was no more productive use to the program.

Good news is that I think I have the problem fixed. Thanks to related posts in this forum, it seems like MUSR_MQADMIN didn't have the required authority. Giving it Admin rights seems to have allowed the real batch file, that which starts my UPES Framework, to fire.

Thanks again
_________________
Keep 'em in the short grass

Gary
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 » General IBM MQ Support » SOLVED: Can't get batch file to run via MQ Trigger
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.