Of course, Windows has to add a twist on that idea (or maybe its a bug or just bad coding <grin>).
On Windows NT/2000, you CANNOT have both stdin & stderr go to the same file. If you do the following command: saveqmgr -m QueueManagerName -f MyOutputfile.txt -R >>log.log 2>>log.log
or
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>>log.log 2>>log.log
The Windows command processor will open the stdout but closes the file when it sees that stderr goes to the same file. In other words, only the last redirect will be used if the same file name is used on both redirects.
It is better to do (on Windows that is) the following: saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>>ok.log 2>>error.log
later Roger...
At 09:47 PM 7/20/2003, you wrote:
Peter,
On unix platforms, I always run it in a batch file with 'LOG=logfilename' and then specify those commands with output to >>$LOG and 2>>$LOG (i.e saveqmgr -m QueueManagerName -f MyOutputfile.txt -R >>$LOG 2>>$LOG). Everything should be under the logfile incluing errors.
Cheers,
Ian
-----Original Message----- From: Potkay, Peter M (PLC, IT) [mailto:[EMAIL PROTECTED] Sent: Saturday, 19 July 2003 6:31 AM To: [EMAIL PROTECTED] Subject: Using MS03, how do I capture its errors to a file?
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R
This is the command that I run from a bat file to back up my QM. If MS03 works, then MyOutputfile.txt has the stuff I need to use runmqsc.
But if MS03 has a problem (maybe the QM is down, or the Command Server is down, etc), it simply hangs for a few seconds, throws an error to the screen, and does not produce any text file at all.
This is a problem since I want to be able to look at a server and see after the fact what the problem was.
Is there any way to capture in a text file the data that MS03 throws out to the screen?
Peter Potkay MQSeries Specialist The Hartford Financial Services [EMAIL PROTECTED] x77906 IBM MQSeries Certified
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies.
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
