MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

avoid looping

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
Meghana
Beginner


Joined: 25 Apr 2003
Posts: 6
Topics: 4

PostPosted: Sat Feb 21, 2004 6:42 am    Post subject: avoid looping Reply with quote

Hello,

is there anyother way to cancel a looping task in CICS region?
because after giving CEMT I TASK, we usually force the task which is
running for a long time.
Back to top
View user's profile Send private message
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Mon Feb 23, 2004 8:36 am    Post subject: Reply with quote

Meghana,

If you have authority, you can DISCARD a transaction.

But NEVER do it. It will remove the transaction definition and its corresponding catalog entry from the CICS. Smile
Back to top
View user's profile Send private message Send e-mail
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Tue Feb 24, 2004 11:08 am    Post subject: Reply with quote

hari is talking about something completely different - deleting/discarding a transaction definition. This in no way relates to cancelling looping tasks.

CEMT SET TAS(xxxxx) PUR
and
CEMT SET TAS(xxxxx) FOR

are the two CICS-provided ways to cancel a running task - PURGE and FORCEPURGE

The exact equivalents can be done in a program using the
EXEC CICS SET TASK() PURGE/FORCEPURGE
system programmer commands

Also, sometimes a terminal related task can be made to abend using
CEMT SET TE(xxxx) REL
if it is waiting for terminal activity

Otherwise, you are probably looking at 3rd party 'monitor' products such as Omegamon/CICS, Mainview, Sysview, TMON etc. which have their own purge/kill facilities. You may well have one of these products available.
Back to top
View user's profile Send private message
Meghana
Beginner


Joined: 25 Apr 2003
Posts: 6
Topics: 4

PostPosted: Thu Feb 26, 2004 8:31 am    Post subject: Reply with quote

thanx mike, but can i know is there any way to find out which tasks are in loop.
Back to top
View user's profile Send private message
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Thu Feb 26, 2004 8:55 am    Post subject: Reply with quote

Monitors like the ones I listed will have a task list facility and one task will typically appear as 'running' or similar all or most of the time and will have a high and increasing CPU count, although there is no easy way to say for certain if a particular task is actually looping - it might just be a long running task which needs to use a lot of CPU. You can use the monitor facilities to manually kill tasks which you suspect are looping. You can also (in Omegamon and possibly other products) set up rules which will cause the monitor to automatically kill tasks which use more than a set amount of CPU/elapsed time/IO etc.
If you don't have a monitor product, it is possible to write a simple task killer to run non-terminal attached in CICS. It won't deal with unyielding loops (ones where the application stays in control and never goes through CICS code) but these loops should be deal with automatically by the CICS AICA abend mechanism if your CICS system is set up correctly.
A simple task monitor could consist of a permanantly running background task set to the highest possible priority; it would run (say) once a minute with EXEC CICS DELAY used to suspend it for this period; it could use the EXEC CICS INQUIRE TASK LIST command to get a list of running tasks and store this list; then it would get a new list one minute later; any tasks on both lists could be considered to be looping and be purged. You would have to exempt any genuine long running tasks from purging (e.g. by checking transid).
I think I might have seen some code for this sort of thing a few years back. It might be worth trawling the old code at www.xephon.com (code > 2 years old is available to non subscribers).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group