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
 

 

MQ message to wait for processing

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: MQ message to wait for processing
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

Active Member


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

PostPosted: Mon Jun 22, 2015 1:59 pm    Post subject:
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    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 REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts processing a XML file in PL/1 grvtomar PL/I & Assembler 2 Fri Jun 09, 2017 1:07 pm
No new posts File processing vishwakotin Mainframe Interview Questions 14 Fri Apr 28, 2017 11:38 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts Run stats processing on zIIP Engine Virendra Shambharkar DB2 9 Fri Oct 14, 2016 10:24 am


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