How do you process several MQ related messages in CICS? Front-end servers send >1 related message to a local queue defined in CICS, assuming the number of messages sent to CICS varies depending on user transaction requests.The >1 message may be sent to CICS in different intervals too. Upon the very first message that arrives at the local queue, a CICS transaction will be trigger. The CICS pgm is supposed to get all related messages and do some processing before replying to that particular user. How do you code the CICS pgm so it is able to get all related messages for that particular user? We have to assume that there will be other users who will also send >1 related messages from server to CICS.
One of the basic things to note about MQ operation is that the messages are not guaranteed to arrive in the same order that they were sent. Although I'm not excessively familiar with MQ, I do remember that the way to cope with this is to the relevant fields in the message headers (?MSGID or ?CORRELID but I'm too out of MQ activity to know if these are correct). I suggest you bash up some sort of formatting which records the total number of messages to be sent and then put this max number along with the actual number in these fields. Then you can know within CICS that you have got all you are interested in before continuing processing. Observe that the Message in the TriggerQ will give you the info you need to collect the set of messages in the InputQ.
CICS Technical Strategist -- CICS expert at Search390.com
Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.