Home > Ask the Data Center Experts > CICS Questions & Answers > Processing several MQ related messages in CICS
Ask The Data Center Expert: Questions & Answers
EMAIL THIS

Processing several MQ related messages in CICS

Robert Crawford EXPERT RESPONSE FROM: Robert Crawford

Pose a Question
Other Data Center Categories
Meet all Data Center Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 25 November 2003
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.


>
EXPERT RESPONSE
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.

Robert Harris
Inventor
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 discussion forums.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
CICS
Which MQ Queue is related with which CICS transaction?
Can a program use IXLLIST macros in CICS?
VSAM files in CICS -- Batch report help
Reading VSAM data from different LPARs
Finding executed statements in CICS
Submitting a batch job from CICS
Automating FTP transfers to AIX
FTP a dataset from MVS to Linux
Mainframe FTP - A simple check
Failed arithmetic operations on CICS programs written in C

CICS Newsletter
Using CICS event monitoring points (EMPs) for tuning and debugging
Implementing CICS managed data tables
Taking advantage of the CICS workload dispatch ratio
CICS 3270 bridge tutorial, part 3: How to start and end a conversation
CICS 3270 bridge tutorial, part 2: Using DFHL3270
Mainframe applications never die: Using the 3270 bridge
Hash table how-tos for mainframe programmers
Can a program use IXLLIST macros in CICS?
CICS socket interface
How to use CPSM's PNEWCOPY command

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts