Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1006
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 Trap the jcl error message or maxcc i... ankita agarwal CLIST & REXX 5 Fri May 18, 2018 2:08 pm
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts HSM log message : GENMSG -ROU/1 -NL/! kadiresh JCL & VSAM 1 Sat Mar 03, 2018 5:52 pm
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us