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 » Mainframe, CICS, TXSeries » Issue in MQ inquire

Post new topic  Reply to topic Goto page 1, 2  Next
 Issue in MQ inquire « View previous topic :: View next topic » 
Author Message
Umeshrath
PostPosted: Wed Apr 26, 2006 10:26 am    Post subject: Issue in MQ inquire Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

Hi,

I am trying to do an MQINQUIRE in batch enviornment.
My requirement is to know the current depth of the queue.
I opened the queue with
Open Para.

MOVE MQOO-INQUIRE TO WS-MQ-FUNCTION
COMPUTE WS-MQ-OPEN-OPTIONS = MQOO-INPUT-SHARED
+ MQOO-FAIL-IF-QUIESCING
+ WS-MQ-FUNCTION
END-COMPUTE

MOVE 'HSSERR' TO LS-MQ-OBJECT-NAME
MOVE LS-MQ-OBJECT-NAME TO WS-MQ-OBJECT-NAME
MOVE MQOT-Q TO MQOD-OBJECTTYPE
MOVE WS-MQ-OBJECT-NAME TO MQOD-OBJECTNAME

CALL WS-MQOPEN USING WS-MQ-CONN-HANDLE
WS-MQ-OBJECT-DESCRIPTOR
WS-MQ-OPEN-OPTIONS
WS-QUEUE-OBJECT-HANDLE
WS-MQ-COMPLETION-CODE
WS-MQ-REASON-CODE
END-CALL

MQ ENQUIRE PARA.

MOVE MQOT-Q TO MQOD-OBJECTTYPE
MOVE WS-MQ-OBJECT-NAME TO MQOD-OBJECTNAME
MOVE MQIA-CURRENT-Q-DEPTH TO MQ-INQRY-OPTION3
MOVE WS-MQINQ TO MQ-DSPL-FUNC


CALL WS-MQINQ USING WS-MQ-CONN-HANDLE
WS-MQ-CONN-HANDLE
MQ-INQRY-OPTIONS-CNT
MQ-INQRY-OPTIONS
WS-INQRY-INTATTR-CNT
WS-INQRY-INTATTRS
WS-INQRY-CHAR-LENGTH
WS-INQRY-CHARS
WS-MQ-COMPLETION-CODE
WS-MQ-REASON-CODE

I am not getting the queue depth. It is coming as zero.

Regards,
Umesh
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Wed Apr 26, 2006 10:40 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

So are MQ-INQRY-OPTIONS-CNT and WS-INQRY-INTATTR-CNT set to "1"?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Umeshrath
PostPosted: Wed Apr 26, 2006 7:31 pm    Post subject: Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

Yes.
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
JoePanjang
PostPosted: Thu Apr 27, 2006 12:15 am    Post subject: Reply with quote

Voyager

Joined: 10 Jul 2002
Posts: 88
Location: Dengkil MALAYSIA

Any compcode / reason code?

'MQOPEN' call missing MQOD-OBJECTQMGRNAME? No QMGR name being pass?

I did code the same COBOL pgm 10 years ago in v1.2 and until today it's still running(v5.3). I'm using NAMELIST to store all the queues to be checked during SOD.
_________________
Every good deed is charity...
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Apr 27, 2006 2:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

What type of queue are you opening? qlocal? cluster queue definition? model queue? shared queue?... and, the obvious question...are you sure there are actualy messages on the queue?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Umeshrath
PostPosted: Thu Apr 27, 2006 6:12 am    Post subject: Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

I am opening a local queue and there are records in the queue.

The reason code is 2 and completion code is zero but the depth is showing as zero.
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
kevinf2349
PostPosted: Thu Apr 27, 2006 8:10 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Which call is actually failing? The MQINQ?
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Apr 27, 2006 8:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Umeshrath wrote:
The reason code is 2 and completion code is zero ....
That seems unlikely. Its more like that the compcode is 2 and there is a non-zero reason code. As Kevin asks, which call is getting this? The mqopen or the mqinq?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Umeshrath
PostPosted: Thu Apr 27, 2006 8:59 am    Post subject: Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

MQINQ call. MQOPEN is successful.
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
JoePanjang
PostPosted: Thu Apr 27, 2006 4:42 pm    Post subject: Reply with quote

Voyager

Joined: 10 Jul 2002
Posts: 88
Location: Dengkil MALAYSIA

update the code to display the completion / reason code. your MQ-INQRY-OPTION3 is defined in MQ-INQRY-OPTION?
_________________
Every good deed is charity...
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Apr 27, 2006 4:55 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

At this point , you might be better off taking one of the three MQINQ cobol samples and modifying that to do what you need: amqminqx amqiinqx amqvinqx. They do an inquire on the current depth of a queue.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Umeshrath
PostPosted: Thu Apr 27, 2006 6:44 pm    Post subject: Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

From Where i will get the sample codes?
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
kevinf2349
PostPosted: Thu Apr 27, 2006 6:52 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

I believe you need to look in hlq.SCSQCOBS where hlq is probably SYS1

You could also always read the APG I think there are some samples in there too.
Back to top
View user's profile Send private message
Umeshrath
PostPosted: Thu Apr 27, 2006 7:37 pm    Post subject: Reply with quote

Novice

Joined: 27 Dec 2005
Posts: 23
Location: Hyderabad

Hi Kevin,

Can you provide me the link for APG or a hint where i will find that.

Regards,
Umesh
_________________
Umesh Rath
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Fri Apr 28, 2006 1:27 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/sappls.htm
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Issue in MQ inquire
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.