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 » read mq errors in .bat file

Post new topic  Reply to topic
 read mq errors in .bat file « View previous topic :: View next topic » 
Author Message
snake_m4
PostPosted: Wed Jul 31, 2013 7:35 am    Post subject: read mq errors in .bat file Reply with quote

Newbie

Joined: 23 Apr 2013
Posts: 4

Hi
I am using amqsput to send a message to a queue from .bat file in windows.
call "C:\folderdir\code\mqfile\amqsput" QUEUE QMGR < File

The code works fine. However I want to capture the errors and echo appropriate response message.

Ex - if the queue is full, mq will return an error code and message. I want to capture the message and code and print it on screen.

errorlevel doesnt capture the mq error codes.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 31, 2013 7:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You have correctly deduced that amqsput, the sample program, does not use windows error level to return the MQRC.

Some simple experimentation should have already shown you that it uses standard out or standard error.

Some simple reading should have shown you that amqsput is a sample program, not intended to be a production utility.

Some more advanced reading should have lead you to considering using MQFTE to perform file->queue options.
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 » read mq errors in .bat file
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.