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 » how to delay getting messagges from queue

Post new topic  Reply to topic
 how to delay getting messagges from queue « View previous topic :: View next topic » 
Author Message
giuly020277
PostPosted: Thu Mar 07, 2013 8:19 am    Post subject: how to delay getting messagges from queue Reply with quote

Centurion

Joined: 07 Aug 2007
Posts: 146
Location: Florence,Italy

Hello everyone again ..

I need to know if it's possible to delay a program that get messages from queue ( websphere Mq on zos).
I have a queue on zos triggered type "every". a program get message and process it in a few time. Programmer don't wan't to have some process that run togheter..so he would delay that...
It's possible only changing program that get messages from queue ( maybe introducing a delay of X seconds from one get to another) or exist some parameters on Webpshere Mq on zos that do it?
what about service interval? I have read about it...it seems it could be useful.

What do u think?

Thank u all
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 07, 2013 8:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It depends on what you mean by "is it possible".

Yes, it's possible.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Mar 07, 2013 9:39 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5853
Location: UK

Trigger every is a bad idea. Your design sounds like a poor one.

Use trigger first and design the program to read the queue until it is empty, then terminate. Using MQGET with a modest wait interval (MQGMO_WAIT) will also help to reduce the number of times (even this better design) has to be invoked.

That way only one process servicing this queue will run at one time.

Incidentally set the QM trigger interval to some value like 60000 to make sure any trigger queues get re-triggered if something goes wrong and the queue is not drained.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 07, 2013 9:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

zpat wrote:
Trigger every is a bad idea.

You missed the part, zPat, where giuly020277 said "on zos".

trigger every is still the recommended option for CICS, afaik.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Mar 07, 2013 12:07 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5853
Location: UK

CICS is not mentioned. However my design also works in CICS.

Of course CICS has transaction management which can control the number of concurrent tasks and so on, but that's like making a virtue out of a necessity with the trigger every. It sounds like he does not want or need parallel processing.

It also depends if the CICS transaction is MQ aware, or one of the olde-worlde pass the message in the commarea dinosaurs.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Mar 07, 2013 1:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

zpat wrote:
CICS is not mentioned. However my design also works in CICS.


Both of these statements are true. However the vast bulk of MQ work on z/OS is done via CICS, and the use of trigger "every" implies it. While your design does indeed work and is usually the recommended option, trigger "every" remains the exception that proves the rule if you're using CICS.

zpat wrote:
Of course CICS has transaction management which can control the number of concurrent tasks and so on, but that's like making a virtue out of a necessity with the trigger every. It sounds like he does not want or need parallel processing.


It sounds like he wants parallel processing, just a bit less parallel.

zpat wrote:
It also depends if the CICS transaction is MQ aware, or one of the olde-worlde pass the message in the commarea dinosaurs.


The use of a trigger mostly answers that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Mar 07, 2013 2:31 pm    Post subject: Re: how to delay getting messagges from queue Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2505
Location: Melbourne, Australia

giuly020277 wrote:
Programmer don't wan't to have some process that run togheter..

Why not? TRIGGER EVERY implies that multiple copies of the program may be running together to process messages.

If there is more than say one message per second it might be better to use TRIGGER FIRST, and the program loops after processing each message to get the next one. Use a Wait Interval of say 10 - 60 seconds. If there are no messages to get after that time, exit the program.

In fact, a TRIGGER EVERY program should also be written as a loop, with a short Wait Interval. This handles the situation where not enough triggers got fired or not enough copies of the program were able to start, and there are still messages sitting on the queue.
_________________
Glenn
Back to top
View user's profile Send private message
giuly020277
PostPosted: Fri Mar 08, 2013 12:18 am    Post subject: Reply with quote

Centurion

Joined: 07 Aug 2007
Posts: 146
Location: Florence,Italy

sorry...

yes..my queue is triggerd by cics...and i want to process one message at time...and i don't want to have so many process togheter.

I'd like to process a messages...wait for some times to permit it to end...then process another one...and so on...

Programmer don't want to have some process togheter...who cause traffic on websphere application serve
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Mar 08, 2013 2:37 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9415
Location: US: west coast, almost. Otherwise, enroute.

Yours is an unusual requirement. It is rare for someone to complain that messages are being processed too quickly.

It is unusual to require (limit) one consumer app only, but not unheard of. Message-affinity demands a single consumer get messages when two or more messages comprise a transaction.

If the requirement is for only onre consuming application, then use the queue attribute trigtype (depth) with depth (1). This will turn off triggering after the first msg arrives on the queue, and the first consumer app is launched. The app must set triggering on before the app ends.

Some languages support a timer-wait function. Such a function could be writtrn is assembly language on z, and called from cobol or c.

The app could get the current time-of-day, then loop until n-seconds elapse. Both techniques are possible, but make little sense to me
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
giuly020277
PostPosted: Fri Mar 08, 2013 3:09 am    Post subject: Reply with quote

Centurion

Joined: 07 Aug 2007
Posts: 146
Location: Florence,Italy

I agree with u bruce...but programmer ask me that.
Thay have an application that spent x time to process one messagge.
So...they don't want to have traffic caused from multiple messages that arrive on queue sequentially...

I will tell them to add a wait on their application.

I have seen the parameter "service interval" on Queue Manager on zos.
What does it do??Do u know it?
Back to top
View user's profile Send private message
Toronto_MQ
PostPosted: Fri Mar 08, 2013 6:47 am    Post subject: Reply with quote

Master

Joined: 10 Jul 2002
Posts: 263
Location: read my name

Vitor wrote:
However the vast bulk of MQ work on z/OS is done via CICS


Is this really the norm in most shops? Not here. We have CICS but it's not our biggest MQ user on z.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Mar 08, 2013 7:19 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9415
Location: US: west coast, almost. Otherwise, enroute.

Toronto_MQ wrote:

Is this really the norm in most shops? Not here. We have CICS but it's not our biggest MQ user on z.

Looking at it from the other direction, most z/OS shops have CICS as their transaction work-horse. CICS predates WMQ by a few decades. WMQ, in its role as middleware, extends access to CICS and batch apps, and z/OS data, to other platforms.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Mar 08, 2013 7:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Toronto_MQ wrote:
Vitor wrote:
However the vast bulk of MQ work on z/OS is done via CICS


Is this really the norm in most shops? Not here. We have CICS but it's not our biggest MQ user on z.


Slightly bold statement I suppose. In my experience this is the case; WMQ is leveraged principally for real time transactions which,of course, run under CICS & I echo the point about CICS being entrenched as a work horse.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » how to delay getting messagges from queue
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.