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 » RC for the mqsc cmd

Post new topic  Reply to topic
 RC for the mqsc cmd « View previous topic :: View next topic » 
Author Message
vandi
PostPosted: Sun Dec 14, 2008 8:43 am    Post subject: RC for the mqsc cmd Reply with quote

Acolyte

Joined: 13 Dec 2008
Posts: 67

Hi All,

I have a doubt regarding the return code of mqsc cmds.

Whenever we execute the mqsc cmds thru scripts, we verify the successfull

execution of the cmd thru RC(RETURN CODE). I know how to get the mqrc

bcodes from cmmand prompt. But could you please let me know how to get

the return codes from command prompt.

Thanks in Advance.
Vandi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Dec 14, 2008 11:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If you redirect the output of mqsc to a file you can grep it for AMQ and discard with grep -v all the ones meaning success.
So with cat -n | grep |grep -v and the right AMQ codes you get as output the line that had an error. All you need to do then is open the output file from mqsc, go to that line and check what the command and error was.

Of course, if you run runmqsc you can use the verify flag before you actually load the file and check that output.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Sun Dec 14, 2008 3:37 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Generally, the MQSC (script) commands themselves either work, or fail to work.

After the last (or only) MQSC is processed, the processing program (csqutil on z/OS, runmqsc on UNIX and Windows), will post a Return Code that reflects the series (zero, one or more) of MQSC commands processed.

For informatoin on executing the WMQ applications that process the MQSC commands (csqutil, runmqsc) refer to the appropriate System Administration manual. I have pasted the Return Codes from the two System Admin manuals here:

For z/OS:
Return codes
When CSQUTIL returns to the operating system, the return code can be:
0 All functions completed successfully.
4 Some functions completed successfully, some did not or forced a syncpoint.
8 All the attempted functions failed.
12 No functions attempted; there was a syntax error in the statements or the expected data sets were missing.

For midrange:
Return codes
00 MQSC command file processed successfully
10 MQSC command file processed with errors; report contains reasons for failing commands
20 Error; MQSC command file not run

As previously posted, you will need to examine the output of the processing program to find out which, if any, MQSC commands were not processed to your satisfaction.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
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 » RC for the mqsc cmd
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.