Author |
Message
|
Monk |
Posted: Wed Apr 15, 2009 9:33 pm Post subject: MQPUT1 behaviour different on aix and solaris? |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Hi All,
I m using the MQPUT1 call and i m passing a null pointer as a buffer to the API input parameter.
Now when i do this on
1. Solaris MQ v6 - returns compcode as 2
2. Solaris MQ v7.0.0.1 - return CompCode as 2
3. Aix MQ V7.0.0.1 - returns CompCode 0.
I have the same code compiled on both platforms but the behaviour is different on solaris and aix.
Is this a problem with MQ v7 or MQ v7.0.0.1 or aix ? _________________ Thimk |
|
Back to top |
|
 |
gunter |
Posted: Thu Apr 16, 2009 12:03 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Check if BufferLength is zero too and check the reason code. Maybe it has nothing to do with the buffer.
From doc 6.0:
Quote: |
If the BufferLength parameter is zero, Buffer is not referred to; in this case, the parameter address passed by programs written in C or System/390(R) assembler can be null. |
From doc 7.0
Quote: |
Zero is valid, and indicates that the message contains no application data. |
_________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 16, 2009 12:04 am Post subject: Re: MQPUT1 behaviour different on aix and solaris? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Monk wrote: |
Is this a problem with MQ v7 or MQ v7.0.0.1 or aix ? |
No it's a problem with you checking for success or failure with a number rather than using the MQCC_OK or MQCC_FAILED constant provided for your version and platform.
If you do this, do the call and the result of the call is at variance with the code (i.e. you get a message on the queue and MQCC_FAILED tests true), then it's PMR time.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Monk |
Posted: Thu Apr 16, 2009 2:32 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Poobah,
Just like u said i checked against the MQCC_OK and MQCC_FAILED.
and on aix MQ v7.0.0.1
passing a null pointer as a bufffer to MQPUT call. I m getting MQCC_OK
But its supposed to give 2004 MQRC_BUFFER_ERROR.
And the same code on solaris MQ v7.0.0.1 give MQCC_FAILED with MQRC_BUFFER_ERROR.
Does this mean its PMR time?
 _________________ Thimk |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 16, 2009 2:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Monk wrote: |
passing a null pointer as a bufffer to MQPUT call. I m getting MQCC_OK
But its supposed to give 2004 MQRC_BUFFER_ERROR.
Does this mean its PMR time?
 |
If the actual behaviour of the product differs from the documented behaviour, then yes. So if the documentation states that you get a buffer error putting a null pointer raise a PMR.
IMHO I don't think a null pointer is necessarially invalid. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Monk |
Posted: Thu Apr 16, 2009 2:50 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Poobah,
The behaviour is different for solaris and aix for the same call.
i.e on solaris MQ v7.0.0.1 the same MQPUT give MQCC_FAILED.
and on aix MQ v7.0.0.1 MQPUT gives MQCC_OK.
This means the problem is in aix. and i need to raise a PMR , correct? _________________ Thimk |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 16, 2009 4:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Monk wrote: |
This means the problem is in aix. and i need to raise a PMR , correct? |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|