Author |
Message
|
Mukilan |
Posted: Mon Jan 31, 2005 10:14 pm Post subject: Regarding dspmq |
|
|
Newbie
Joined: 31 Jan 2005 Posts: 3
|
Hai Friends,
I want to know when the dspmq command will fail. Sometimes i am not getting the status of Queue Manager when i use dspmq command. But the particular Queue Manaager exists. What are the possible causes for the dspmq command failure (ie unable to get the status).
Thanks & Regards,
Mukil |
|
Back to top |
|
 |
kirani |
Posted: Mon Jan 31, 2005 11:36 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What is the return code you are getting? Are there any commands logged into system error log?
Per System admin guide, this command can return following return codes.
0 - Command completed normally
36 - Invalid arguments supplied
71 - Unexpected error
72 - Queue manager name error _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Mukilan |
Posted: Tue Feb 01, 2005 1:09 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2005 Posts: 3
|
Hai Kirani,
Actually we are not directly using the dspmq command at the command prompt. We are using in a C++ application as follows.
Code:
...
...
...
sprintf(strCmd,"cmd.exe /c DSPMQ -m %s > \"%s\" ",
QueMgrName,OutputFile);
ExecProcess(strCmd); // Using CreateProcess we execute
the command
// Parse the "STATUS" attribute in the output file OutputFile. if it is
// present, then return its value to status variable
status = Parse(OutputFile, "STATUS");
if (status != NULL)
{
// Do something
}
else
{
cout << "Invalid Object";
return -1;
}
// remaing codes.
At one point of time, i am getting "Invalid Object" message, but the Queue Manager exists. What are the possible causes for this output?. I think, it may not be Queue manager name error and Invalid arguments supplied. Then what will be reason and Why?.
After some time, if i execute the same application on same Queue Manager, it is working fine and not giving "Invalid Object" message. Awaiting for reply.
Regards,
Mukil |
|
Back to top |
|
 |
rajesh_avrs |
Posted: Sun Feb 20, 2005 4:01 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2001 Posts: 31
|
If I understand your problem right, your code is to figure out if the given queue manager is available for connection? (am i correct?)
Why can't you issue an MQCONN in a try-catch block?? If the Queue Manager is not avilable for connection, the execution take you to the catch block where you can put your 'Do something' code? _________________ ****************
MQSeries is cool
**************** |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Feb 21, 2005 12:43 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
Mukilan wrote: |
At one point of time, i am getting "Invalid Object" message, but the Queue Manager exists. What are the possible causes for this output?. |
Do you always make a copy of the output file for debug purposes?
it could be the file is locked or whatever and there is nothing wrong with MQ. _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
bobbee |
Posted: Wed Jan 26, 2011 12:37 pm Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
someone just asked me this same question, I searched and did not find an answer.
Under what conditions (reasons) does MQ report a QMGR as Abnormal Termination or Normal Termination. I would suspect that a successful endmqm would show a normal termination. is the converse true, that if the QMGR has ended and NO endmqm was issued it considers it Abnormal? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 26, 2011 8:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bobbee wrote: |
someone just asked me this same question, I searched and did not find an answer.
Under what conditions (reasons) does MQ report a QMGR as Abnormal Termination or Normal Termination. I would suspect that a successful endmqm would show a normal termination. is the converse true, that if the QMGR has ended and NO endmqm was issued it considers it Abnormal? |
From my experience you get an "Abnormal Termination" status when the qmgr either died or was shutdown using the kill commands (hopefully as specified by the admin manual).
On shutdown using endmqm you get the message for a status between normal shutdown, immeditate shutdown, (and don't remember what wording goes with the "p" option...)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bobbee |
Posted: Thu Jan 27, 2011 5:31 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
Thanks, This person said the customer wanted internal information on the conditions for the status. Couldn't find more than what you just said. Mucho Gracias!!! |
|
Back to top |
|
 |
|