IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

MQ message to wait for processing


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Sat Jun 20, 2015 5:39 am
Reply with quote

Hi All,

I am working on a MQ/CICS Mainframe environment.

As per my requirement, I am receiving messages (XML format) on MQ which then triggers one CICS transaction ETTT (for example). Now this transaction/program cannot proceed with processing the message if a flag in some other DB2 table is set to Y. Program processing has to wait until that flag is set back to N. N is like a green signal. Y is like a red signal.

Now this flag could be set to Y for several minutes and for that many minutes I do not want to make my cobol program wait/sleep.

I was thinking of two options but not sure how to make it working:

1. Start with a non destructive read (with browsing mode)
Problem with this is that if that Db2 table flag is set to N already then how do I convert this to destructive read.

2. Start with normal MQGET and if I see DB2 flag as Y then write the message to a temp table and exit the program. But there I am not sure what will happen to the rest of the message which are in the queue.

Any thoughts on this. If you want I can elaborate further.

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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Jun 22, 2015 1:59 pm
Reply with quote

Quote:
1. Start with a non destructive read (with browsing mode)
Problem with this is that if that Db2 table flag is set to N already then how do I convert this to destructive read.


All you would need to do is ENDBROWSE and then issue the destructive MQGET specifying the relevant MSGID. However, this is not a good approach to your situation because, if you don't issue a destructive MQGET and terminate your task, this message will then be at the head of the queue when the next message arrives to generates a trigger. How do you ensure that the correct message is then retrieved? I don't see a field in the Trigger Message that you can use for this.


Quote:
2. Start with normal MQGET and if I see DB2 flag as Y then write the message to a temp table and exit the program. But there I am not sure what will happen to the rest of the message which are in the queue.


This looks more like the way to go. There is no problem with the rest of the messages which are in the queue as they will be processed when triggered (I assume you're using TRIGGER=EVERY and that messages are individual ?). You need some mechanism, though, to process the messages from the temporary table to the DB2 table when the flag gets set to 'N'.

Garry.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts Wait for job rc CLIST & REXX 10
No new posts dsnrexx fails without error message CLIST & REXX 9
No new posts Print out all lines with 'IBM' compil... CLIST & REXX 8
Search our Forums:

Back to Top