View previous topic :: View next topic |
Author |
Message |
Meghana Beginner
Joined: 25 Apr 2003 Posts: 6 Topics: 4
|
Posted: Sat Feb 21, 2004 6:42 am Post subject: avoid looping |
|
|
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 |
|
|
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Mon Feb 23, 2004 8:36 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Tue Feb 24, 2004 11:08 am Post subject: |
|
|
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 |
|
|
Meghana Beginner
Joined: 25 Apr 2003 Posts: 6 Topics: 4
|
Posted: Thu Feb 26, 2004 8:31 am Post subject: |
|
|
thanx mike, but can i know is there any way to find out which tasks are in loop. |
|
Back to top |
|
|
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Thu Feb 26, 2004 8:55 am Post subject: |
|
|
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 |
|
|
|
|