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
 

 

Deleting messages from Reply queue

 
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: Mon May 30, 2011 12:00 pm    Post subject: Deleting messages from Reply queue
Reply with quote

Hi All,

I have a requirement to delete the messages from reply queue. I need to check if the message put time is 15 mins prior to current time, I need to delete those messages. For ex. if there are 5 messages out of which 3 have arrived after 11 AM and 2 messages before 11 AM. If current time is 11.15AM, then I have to dlete the 2 messages which have arrived before 11AM. How can I do this?

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

Garry Carroll

Active Member


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

PostPosted: Mon May 30, 2011 1:40 pm    Post subject:
Reply with quote

This is a strange requirement.

Typically, the application which MQPUT(1)s the reply message would specify an expiry interval in the MQMD of the reply message. Once this expiry interval has elapsed, MQ will flag the message as unavailable and MQ's housekeeping will take care of deleting it.

Otherwise, your application processing the reply queue needs to MQGET every message (specify MQMI-NONE and MQCI_NONE) and check the MQMD.PutTime against the current time. Doing this, you then probably need some mechanism to correlate the replies that you will not simply delete with the corresponding request messages.

I'd rethink the application design to use MQ facilities.

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

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue May 31, 2011 3:43 am    Post subject:
Reply with quote

See the manual

Pay particular attention to the sections labeled

"Removing a message that you have browsed" (note: a "normal" Browse is NON-destructive) and

"Browsing messages when the message length is unknown" (note: why read the entire message into a buffer when you aren't really going to look at its contents?)

under the section labeled

"Browsing messages on a queue"

You may have to follow the links to find the proper MQOPEN options, etc.
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
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 2 Tue May 09, 2017 6:31 pm
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 ims program to put and get MQ messages fatenezzat COBOL Programming 1 Wed Feb 17, 2016 1:07 am
No new posts REXX / CA TOP SECRET messages carlos fuentes CLIST & REXX 2 Tue Oct 27, 2015 11:02 pm
No new posts CA-7 queue reallocation Kamil Tluczek CA Products 4 Thu Sep 17, 2015 12:44 am


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