Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Get with wait interval

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
veeruspi

New User


Joined: 29 Dec 2005
Posts: 16
Location: mysore

PostPosted: Fri Mar 18, 2011 2:45 pm    Post subject: Get with wait interval
Reply with quote

Does get with wait interval takes exclusive control of the queue? Suppose I have ten transactions running. If a transaction has issued get with wait interval of 5 minutes, can the other transaction still put the message on to the same queue?
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 994
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Mar 18, 2011 7:57 pm    Post subject:
Reply with quote

MQGET with WaitInterval does not prevent other applications accessing the queue. Typical non-triggering client/server scenario is that the server application has an outstanding MQGET-wait which is waiting for a client application to issue an MQPUT(1). If MQGET 'blocked' the queue, the client wouldn't be able to MQPUT(1) its message.

If using MQ-triggering to launch the server application, having a waited MQGET in the server app is pointless - the message will be retrieved immediately. WaitInterval specifies the maximum time to wait for a message to satisfy an MQGET. A message arriving during that WaitInterval will be processed immediately. The MQGET will timeout if no message arrives during the WaitInterval.

Garry.
Back to top
View user's profile Send private message
veeruspi

New User


Joined: 29 Dec 2005
Posts: 16
Location: mysore

PostPosted: Mon Mar 21, 2011 10:42 am    Post subject:
Reply with quote

Hi Garry,
Thanks for your quick response. So you mean to say that, there wont be any problem in terms of accessing the same queue to put a message by using other transactions.
I am new to this MQ stuffs. By going through the concepts I am coding programs. I would like to know the exact answers for the below questions. I tried to find the answers in forums but could not understand.

1. Whats the difference between signalling and MQGET with wait? Theoretically I know that signalling is to signal a perticular transaction when reply message arrives on to a queue and MQGET with wait is waiting for a peticular message to arrive in the queue. But for my requirement, there will be on an average 10 transactions triggered per minute. So is using signalling a better option over using MQGET with wait?

2. When do we code MQRO-COPY-MSG-ID-TO-CORREL-ID? In my program I have added MQPMO-NEW-MSG-ID to MQPMO-OPTIONS and I have generated new message id while putting a message onto request queue. This new msg id I have stored in a temporary variable and have moved it to MQMD-CORRELID and used MQMO-MATCH-CORREL-ID in MQGMO-MATCHOPTIONS while retrieving from queue. I need to know when exactly we have to use MQRO-COPY-MSG-ID-TO-CORREL-ID.

3. If we use CICS Delay between retrieving a message from queue1 and putting a message onto queue2, will the queues be blocked for other transaction from accessing these queues?

Your responses on these will be very useful.

Thanks
Veeru
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 994
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Mar 21, 2011 12:59 pm    Post subject:
Reply with quote

Hi Veeru,

1. I'm not sure what you mean by signalling. In my shop we use two techniques - either triggering or a long-running application.

For triggering, an application is launched for each message arriving. In this case, the server application issues a single MQGET with no WaitInterval, processes the message, MQPUT1 the reply and terminates.

For high volume, I prefer to use a long-running server application. This issues MQGET with WaitInterval and with MQMD.MsgId set to MQMI-NONE and MQMD.CorrelId set to MQCI-NONE. This will get any message that arrives and process it, then loop back and issue another MQGET for the next message and so on. Typically, the long-running task interrogates the message content and spawns a background task to process. As it happens, this is how triggering under CICS works, so you save the MQPUT and MQGET of the trigger message. Code fairly long WaitIntervals to reduce cpu consumption during quiet periods.

2. I don't use MQRO-COPY-MSG-ID-TO-CORREL-ID. In my applications I code a move to put the inbound MsgId into the outbound CorrelId just befor the MQPUT1. It doesn't matter where the move is made once it's before the MQPUT1.

3. No. EXEC CICS DELAY only affects the instance of the executing program from a CICS perspective and has no blocking effect on MQ queues. I don't see why you would want such a delay, however.

Garry.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply yugendran COBOL Programming 5 Wed Oct 05, 2016 1:46 pm
No new posts OMEGAMON to see In-DB2 times and Wait... Archana89 IBM Tools 4 Fri Mar 04, 2016 11:28 am
No new posts Adding multiple trailer records at re... kenshin DFSORT/ICETOOL 6 Fri Sep 25, 2015 11:01 am
No new posts MQ message to wait for processing mohitsaini Java & MQSeries 1 Sat Jun 20, 2015 5:39 am
No new posts How to recall (or wait for recall of)... JPVRoff PL/I & Assembler 4 Wed Feb 18, 2015 9:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us