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 » IBM MQ API Support » MQRC_NO_MSG_AVAILABLE problem

Post new topic  Reply to topic Goto page 1, 2  Next
 MQRC_NO_MSG_AVAILABLE problem « View previous topic :: View next topic » 
Author Message
mk.gupta
PostPosted: Mon Aug 20, 2007 4:46 am    Post subject: MQRC_NO_MSG_AVAILABLE problem Reply with quote

Novice

Joined: 27 Mar 2006
Posts: 13
Location: CA, US

Hi,
For 2033 error codes, we should be expecting either MQCC-WARNING or FAILED as Our processing only processes MQCC-OK.
It appears though that that we are having MQCC-OK MQ response though it should only be MQCC-WARNING or FAILED for it is actually a 2033 Response code.
Our module currently uses the following parameters on our GET Processing:

COMPUTE MQGMO-OPTIONS = MQGMO-NONE +
MQGMO-NO-WAIT +
MQGMO-SYNCPOINT +
MQGMO-FAIL-IF-QUIESCING +
MQMO-MATCH-CORREL-ID.

Your prompt attention with this concern is hihgly appreciated.
_________________
Regrads,
Manish
manishgupta.tcs@gmail.com
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 20, 2007 4:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What documentation tells you to expect an MQCC-FAILED for an MQRC_NO_MSG_AVAILABLE?

How are you issuing the MQGET? How are you retrieving the CompCode and ReasonCode?

What language are you using?

What environment? What version of MQ?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Aug 20, 2007 4:54 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Looks like COBOL to me.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 20, 2007 4:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

zpat wrote:
Looks like COBOL to me.


Oh, sure. It looks like COBOL to me, too.

But it wasn't stated.

And it could be COBOL on all kinds of things - including Windows or worse.

So.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mk.gupta
PostPosted: Mon Aug 20, 2007 5:04 am    Post subject: Reply with quote

Novice

Joined: 27 Mar 2006
Posts: 13
Location: CA, US

Right, its COBOL on Mainframes.
MQ Ver 5.3
_________________
Regrads,
Manish
manishgupta.tcs@gmail.com
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 20, 2007 5:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

The question still remains, how are you trapping CompCode? And why does a 2033 returning an MQCC-OK cause you a problem? You can still tell the reply you're looking for (I'm assuming you're looking for a reply by correl id) hasn't shown up.

Two points occur:

1) Don't specify NOWAIT-give the reply more time to arrive;
2) Don't specify MQGMO-NONE - it's pointless.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mk.gupta
PostPosted: Mon Aug 20, 2007 5:37 am    Post subject: Reply with quote

Novice

Joined: 27 Mar 2006
Posts: 13
Location: CA, US

CompCode is Nil. The deal is requestor is ahead of provider & requestor is getting the MQCompCode as OK witout getting response from provider, which should not be the case.

So u suggest me to change it to

COMPUTE MQGMO-OPTIONS = MQGMO-SYNCPOINT +
MQGMO-FAIL-IF-QUIESCING +
MQMO-MATCH-CORREL-ID.

Please confirm.

Thanks
_________________
Regrads,
Manish
manishgupta.tcs@gmail.com
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 20, 2007 5:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please show the code that executes MQGET.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 20, 2007 5:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mk.gupta wrote:
So u suggest me to change it to

COMPUTE MQGMO-OPTIONS = MQGMO-SYNCPOINT +
MQGMO-FAIL-IF-QUIESCING +
MQMO-MATCH-CORREL-ID.


I also suggested you set a wait interval.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Aug 20, 2007 6:31 pm    Post subject: Reply with quote

Guest




MQMO-MATCH-CORREL-ID with a 2033 Reason Code indicates that a matching correlid was not (yet) found on the queue. Think of 2033 as an end-of-file indicator. Either there are no messages in the queue, or, as in your case, no matching correlid was found on the queue.

As others have responded to your post: specify MQGMO_WAIT and specify a waitinterval (a second, maybe); then have your program loop back (PERFORM UNTIL for COBOL programmers) to the MQGET until EITHER a non-2033 reason code is returned OR the maximum (total) time your application can wait for a reply message to arrive (measured by: waitinterval * loop-counter) OR forever - whichever makes business sense.
Back to top
mk.gupta
PostPosted: Tue Aug 21, 2007 2:59 am    Post subject: Reply with quote

Novice

Joined: 27 Mar 2006
Posts: 13
Location: CA, US

Hi Jefflowrey,
Please find the code as below -

3100-PREP-MQ-GET. 00072300
*----------------------------------------------------------------*00072400
* *
* THE FUNCTION OF THIS PARAGRAPH IS TO: *
* *
* - PERFORMS THE PREPARATION OF VARIABLES BEFORE GETTING *00072500
* MESSAGES. *00072500
* *
*----------------------------------------------------------------*00072600
00072700
MOVE TRACE-LOWER TO TRACE-UPPER. 00072800
MOVE '3100-' TO TRACE-CUR-ENTRY. 00072900
00073000
INITIALIZE ESMQ-BUFFER-LENGTH. 00073100

MOVE SPACES TO RESP-RESPONSE. 00073300

IF WS-INITIAL-GET
MOVE WS-REPLY-LENGTH TO ESMQ-BUFFER-LENGTH
ELSE
MOVE WS-MQ-DATA-LENGTH TO ESMQ-BUFFER-LENGTH
END-IF.

MOVE WS-MQRFH2-STRUCLENGTH TO RHDR-MQRFH2-STRUCLENGTH.
MOVE MQMI-NONE TO MQMD-MSGID. 00073700
MOVE WS-MQMD-VERSION TO MQMD-VERSION.
MOVE CMDT-MESSAGE-ID TO MQMD-CORRELID. 00073800

SET FLAG-DO-MQGET TO TRUE. 00074600

COMPUTE MQGMO-OPTIONS = MQGMO-NONE + 00075210
MQGMO-NO-WAIT + 00075220
MQGMO-SYNCPOINT + 00075230
MQGMO-FAIL-IF-QUIESCING + 00075240
MQMO-MATCH-CORREL-ID. 00075250

SET WS-CMDATA-NOT-DONE TO TRUE.
00076500
3100-EXIT. 00076600
EXIT. 00076700
/ 00079200
3200-MQGET. 00079300
*----------------------------------------------------------------*00079400
* *
* THE FUNCTIONS OF THIS PARAGRAPH IS TO: *
* *
* - PERFORM GETTING OF MESSAGE FROM THE REPLY QUEUE *00079500
* *
* - FORMAT AND WRITE DEMOGRAPHICS FOR GOOD ACCOUNTS *00079500
* *
* - SET NOT FOUND FLAG FOR ACCOUNTS WITHOUT DEMOGRAPHICS *00079500
* *
* - SET SUSPEND FLAG WHEN TRIUMPH IS STILL UNAVAILABLE *00079500
* *
*----------------------------------------------------------------*00079600
00079700
MOVE TRACE-LOWER TO TRACE-UPPER. 00079800
MOVE '3200-' TO TRACE-CUR-ENTRY. 00079900
00080000
PERFORM 4000-CALL-ESMQUTIL 00080100
THRU 4000-EXIT. 00080100
00080300
C2615 IF ESMQ-REASON = 2033
C2615 SET WS-CMDATA-DONE TO TRUE
C2615 GO TO 3200-EXIT
C2615 END-IF.

IF ESMQ-RETURN-OK 00080900

COMPUTE WS-START-POS =
RHDR-MQRFH2-STRUCLENGTH + LT-1

COMPUTE WS-RESP-LENGTH =
ESMQ-DATA-LENGTH - RHDR-MQRFH2-STRUCLENGTH

MOVE ESMQ-BUFFER-DATA(WS-START-POS:WS-RESP-LENGTH)
TO WS-RESPONSE-LAYOUT
MOVE RESP-RETURN-CODE TO WS-SERVICE-RETURN-CODE 00106910
MOVE RESP-EXPLANATION-CODE TO WS-SERVICE-EXPLAN-CODE 00106920

EVALUATE TRUE

WHEN WS-TRI-COMPLETE-SUCCESS
OR WS-TRI-COMPLETE-WITH-WARNING
PERFORM 3210-FORMAT-GOOD-ACCT
THRU 3210-EXIT

WHEN WS-TRI-APPLICATION-ERROR
AND WS-TRI-ACCT-NOT-FOUND
PERFORM 3220-FORMAT-ACCT-NOT-FOUND
THRU 3220-EXIT

WHEN WS-TRI-RESOURCE-NOT-AVAILABLE
PERFORM 3230-FORMAT-NOT-GOOD
THRU 3230-EXIT

WHEN OTHER
SET WS-CMDATA-DONE TO TRUE
END-EVALUATE
ELSE
IF ESMQ-REASON = 2080
PERFORM 3240-RETRY-MQGET THRU 3240-EXIT
ELSE
PERFORM U300-DISP-ERROR-MSGS THRU U300-EXIT
PERFORM 9300-DO-MQDISCONNECT THRU 9300-EXIT
MOVE WS06-MODULE-NAME TO ESABLNK-DETECTED-BY-PRO
MOVE ESCODE-373 TO ESABLNK-PROG-ERROR-CODE
MOVE WS-LT-DSA TO ESABLNK-SEVERITY
MOVE WS-PARA-3200 TO ESABLNK-PARAGRAPH-NAME
PERFORM 9999-ABEND-ROUTINE
THRU 9999-EXIT
END-IF
END-IF.
00083000
3200-EXIT. 00083100
EXIT. 00083200[/quote]
_________________
Regrads,
Manish
manishgupta.tcs@gmail.com
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 21, 2007 3:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I repeat, why is the OK such a problem (specifically why have you coded like that)? Why have you not (as I & others have suggested) included a wait and/or a delay loop)?

And why are you using what appears to be a really hokey version of COBOL???

(Not connected to your problem, but that's an old style of programming!)

(Also not entirely convinced it's doing what you think it is)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 21, 2007 4:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor - The OK is a problem because MQGET does not do that. It only returns a 2033 when CompCode is MQCC-FAILED.

mk-gupta... I guess it's been too long since I've done COBOL. I'm having a hard time reading that...

The statement that I want to see is the one that actually executes MQGET and returns the CompCode and ReasonCode.

It looks like maybe, unless I'm reading your code entirely wrong, that you're calling a library function (written by someone at your shop) to do the MQGET?

Or do you CALL MQGET USING... yourself somewhere, that you didn't post.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 21, 2007 4:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Vitor - The OK is a problem because MQGET does not do that. It only returns a 2033 when CompCode is MQCC-FAILED.


Things you learn! I'd always believed that CompCode and ReasonCode were populated separately. But do agree that 2033 should be associated with a "failed" completion code rather than an OK
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 21, 2007 4:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
jefflowrey wrote:
Vitor - The OK is a problem because MQGET does not do that. It only returns a 2033 when CompCode is MQCC-FAILED.


Things you learn! I'd always believed that CompCode and ReasonCode were populated separately. But do agree that 2033 should be associated with a "failed" completion code rather than an OK


If you look in the APR, on the MQGET... it clearly documents what RCs can be returned with which CCs...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » MQRC_NO_MSG_AVAILABLE problem
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.