It's quite dangerous to use ENQ/DEQ in conjunction with WebSphere MQ/CICS triggered applications (If you don't know the consequences).
It requires a good program design. The reason to get me up of the chair is the fact that you might lose triggers due to the triggering rules.
Let's have a small example, based on trigger-FIRST:
EXEC CICS ENQ rc <> 0 then exec cics return
MQOPEN INPUT
MQGET w. wait do while rc=0 process data MQGET w. wait End MQCLOSE EXEC CICS DEC EXEC CICS RETURN
This design will with 99% lose a trigger now and then, the reason is you get the trigger message (MQTM) when the queue depth changes from 0->1, and the queue is not open for input.
Why ? Because there is a time gab between I'm issuing the MQCLOSE and EC DEQ. If WebSphere MQ fires the trigger and a new program gets started, it might issue the EC ENQ before the first incarnation have issed the EC DEC. My second incarnation will therefore terminate after it's EC ENQ, and therefore we've lost the MQTM, and will wait until the TRIGINT() expires, which typicly never occurs the configurations I've seen.
Just my $0.02 ;o)
Kind regards Jxrgen
PS: No hard feelings, I did spend about a month tracking down such a situation with a missing MQTM......
From: Ruzi R <[EMAIL PROTECTED]> Reply-To: MQSeries List <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: MQ Triggering in CICS Date: Tue, 2 Mar 2004 04:18:14 -0800
By using EXEC CICS ENQ/DEQ. If the triggered progam A is ENQed, you will get a non-zero return code in the program B that issued the ENQ for Program A. You have to make sure that you DEQ the triggered program A when it is finished processing.
Regards,
Ruzi
--- "Dawson, John" <[EMAIL PROTECTED]> wrote: > Folks, > > In a CICS program, how can I tell that the CICS > program was started from a > MQ trigger? > > > Thanks, > > John Dawson > > Instructions for managing your mailing list > subscription are provided in > the Listserv General Users Guide available at > http://www.lsoft.com > Archive: http://vm.akh-wien.ac.at/MQSeries.archive
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
_________________________________________________________________ Fe alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive