ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Trigger configuration on mainframes

Post new topic  Reply to topic
 Trigger configuration on mainframes « View previous topic :: View next topic » 
Author Message
Qadeer_824
PostPosted: Wed Sep 03, 2008 2:07 pm    Post subject: Trigger configuration on mainframes Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi,
Can someone please help me find the problem in trigger configuration on mainframes? Following is the configuration setup on z/OS queue manager:

1. Defined local queue INPUT.QUEUE as

Code:

DEFINE QLOCAL(APP1.INPUT.QUEUE) +
   TRIGGER +
   DEFPSIST(YES) +
   BOQNAME(BACKOUT.QUEUE) +
   TRIGTYPE(EVERY) +
   INITQ(CICS.INIT.QUEUE) +
   PROCESS(CICS.PROCESS) +
   USAGE(NORMAL)


Code:

DEFINE PROCESS(CICS.PROCESS) +
   APPLID(APP2) +
   APPLTYPE(CICS) +
   USERDATA('CICSAPP2')


Code:

DEFINE QLOCAL(CICS.INIT.QUEUE) +
   DEFPSIST(YES) +
   USAGE(NORMAL)


I feel that the above configuration would setup the triggering. However, when i place an input in the queue APP1.INIT.QUEUE i wold expect the event message to be placed in the CICS.INIT.QUEUE.

However, it doesn't seem to work as i do not see any messages in the CICS.INIT.QUEUE and there is no process connected to this queue !

Please advise !

Many Thanks,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
PeterPotkay
PostPosted: Wed Sep 03, 2008 7:23 pm    Post subject: Re: Trigger configuration on mainframes Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Qadeer_824 wrote:
However, it doesn't seem to work as i do not see any messages in the CICS.INIT.QUEUE and there is no process connected to this queue !

The Queue Manager will not generate trigger messages if it sees there is no process, presumambly a trigger monitor, holding the INIT Q open. Why bother triggering if there is nothing to execute the trigger?

This is one of the trigger conditions spelled out in great detail in the Application Programming Guide.
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/fg13850_.htm


If you want to fake it out, and see what a trigger message looks like, set up a dummy app to open the INITQ for MQGETs.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Qadeer_824
PostPosted: Wed Sep 03, 2008 7:51 pm    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Thanks Peter,
Yes, i am looking for the structure of event message and ensure that triggering works! As advised by you, i have configured the CICS transaction CKTI to monitor the queue CICS.INIT.QUEUE. I now see that the open input count of this queue is 1.

Then i purged the old messages to clear the queue and placed another new message into the queue. However, i still do not see any event message being generated (no error logs etc in transaction CKTI)..

Had there been any problem in triggering, i would have expected a message in DEAD.LETTER.QUEUE, however i am not sure if the queue manager has a default deadletter queue defined. I'll check with the administrator to see if the DLQ is defined.

I had a look at the link given by you. Thats exactly the link i used to configure this triggering setup !

I shall update this once i get a reply from admin. Do you have any other way by which i can see the event messages ?
Back to top
View user's profile Send private message Yahoo Messenger
Mr Butcher
PostPosted: Wed Sep 03, 2008 9:38 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

what kin dof event message are you expecting? there are event messages in mqseries, but they are not related to triggering. so you should stop talking about event messages in terms of triggering.

you will probably not see the trigger message as triggering is a fast process, but you can verify from ckqc or ckti statistics and transaction counters in cics if the triggering was successfull. Sometimes it is a matter for proper security or cics definitions. did you check the MSTR log and the cics log for any error conditions??

in addition, if you trigger every you do not need to clear the queue and put new messages to create a trigger. just put a new message.
for trigger first this would work.
for trigger tyape first this would work, but there are easier ways to create a trigger, e.g. alter the queue get disabled get enabled, or alter notrigger trigger.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Qadeer_824
PostPosted: Wed Sep 10, 2008 6:41 am    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi,
The trigger event message has been confired correctly now. There was a problem with the trigger monitor program. As soon as a messsage is placed into the MQ queues the transaction gets triggered correctly which invokes the program APP2.

However, as per the IBM documentation, APP2 need not open a connection with the queue manager and can directly start using MQOPEN by setting the HCONN value to 0.

Following is the code snippet used to open the triggered queue (APP1.INPUT.QUEUE).

Code:


    05  W1-HCONN                PIC S9(9)  COMP VALUE +0.

    CALL 'MQOPEN' USING  W1-HCONN,                 
                         MQOD,                     
                         W1-OPENOPTIONS,           
                         W1-HOBJ,                 
                         W1-COMPCODE,             
                         W1-REASON.               
EJECT                                             


But, when i place a message in APP1.INPUT.QUEUE, the transaction is triggered and APP2 is executed and throws a MQRC 2018 error which is
2018 0x000007e2 MQRC_HCONN_ERROR.

Can you please point the problem in this?
Back to top
View user's profile Send private message Yahoo Messenger
zpat
PostPosted: Wed Sep 10, 2008 11:39 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

MQOPEN expects a valid connection handle from a prior MQCONN.

However I think CICS does the MQCONN for you? Either way you must supply a valid handle.
Back to top
View user's profile Send private message
Qadeer_824
PostPosted: Wed Sep 10, 2008 12:07 pm    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Yes, there is no need to do an explicit MQCONN while in CICS as the queue manager would already be connected. Below is an excerpt from teh IBM online documentation for calling MQOPEN in CICS.
Code:

Opening objects using the MQOPEN call
As input to the MQOPEN call, you must supply:
A connection handle. For CICS® applications on z/OS™, you can specify the constant MQHC_DEF_HCONN (which has the value zero), or use the connection handle returned by the MQCONN or MQCONNX call. For other programs, always use the connection handle returned by the MQCONN or MQCONNX call.
A description of the object that you want to open, using the object descriptor structure (MQOD).
One or more options that control the action of the call.


I have tried assigning MQHC_DEF_HCONN and value '0' to field W1-HCONN but still it fails.
Huh, i guess i found the problem. Is the keyword 'USING' required? I dont think so.. will try this out tomorrow and see if thats the stupid bug !

Cheers,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
bob_buxton
PostPosted: Wed Sep 10, 2008 2:23 pm    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

The keyword USING is correct.

Have you verified that your program is linked with the CICS MQ stub module CSQCSTUB and not the batch stub CSQBSTUB.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
Qadeer_824
PostPosted: Thu Sep 11, 2008 1:01 am    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

That's it! Thanx a million bob ! As i have been writing only batch progs and this is first time into CICS, i was using CSQBSTUB!

It feels so good when the program runs! lol. I'll get back if i see anymore issues !

tHanks Again!
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Trigger configuration on mainframes
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.