I'm trying to write a Cobol program in order to kill hanging tasks on
my CICS regions.
I'm using this part of code :
IF TIPO-FUNZIONE = "PROG"
EXEC CICS SET TASK(PGMID) PURGE
END-EXEC.
DISPLAY "SET TASK PURGE"
When I run the program I obtain the following error :
ERZ014016E/0036 10/19/09 16:14:45.307464673 CICSW 3227720/0001
Transaction 'CPMI', Abend 'A17U', at '????'.
Could you please help my to understand the matter for this error ?
thanksss
A17U is the abend generated when a TASKIDERR condition is raised - this is probably coming out of your EXEC CICS SET TASK command API indicating either the task does not exist, or the task is protected from the purge'ing. You would need to handle this condition from your application, and take actions (log/ignore) accordingly.
TASKIDERR
Occurs for the following conditions (RESP2=1):
* The named task cannot be found.
* The named task is protected by CICS; that is, it is a CICS-supplied transaction that is normally invoked from within CICS and not by an operator.
Default action: Terminates the task abnormally.
Also fyi, did you take a look at the sample provided by TXSeries located in <install_dir>/samples/purge/purge.ccs (the sample in C language, kills the tasks during shutdown - an helpful tool that prevents forceful region termination).
Hi Hari,
other suggestion ...
the program should remove the tasks associated with the CICS AIX process ID that is occupying my CPU more than "n" minutes, how can I correlate the PID and the number of the CICS task?
for the moment I touched putting a loop verification process still hanging by a minute's walk, then run the "Purge" on them.
do you have a suggestion ?
thanks a lot
Angela
For a given task you can get the corresponding Process ID through the INQUIRE TASK(...) PROCESSID(...) API. You may also think of using MaxTaskCPU and MaxTaskCPUAction (defined in TD and RD) as an alternative - to abend (or just issue a warning) the tasks automatically if it has exceeded the limit in using the CPU.
For a given task you can get the corresponding Process ID through the INQUIRE TASK(...) PROCESSID(...) API. You may also think of using MaxTaskCPU and MaxTaskCPUAction (defined in TD and RD) as an alternative - to abend (or just issue a warning) the tasks automatically if it has exceeded the limit in using the CPU.
For a given task you can get the corresponding Process ID through the INQUIRE TASK(...) PROCESSID(...) API. You may also think of using MaxTaskCPU and MaxTaskCPUAction (defined in TD and RD) as an alternative - to abend (or just issue a warning) the tasks automatically if it has exceeded the limit in using the CPU.
For a given task you can get the corresponding Process ID through the INQUIRE TASK(...) PROCESSID(...) API. You may also think of using MaxTaskCPU and MaxTaskCPUAction (defined in TD and RD) as an alternative - to abend (or just issue a warning) the tasks automatically if it has exceeded the limit in using the CPU.
HTH
Cheers,
Hari
Tags
Use the search field to
find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that
you're viewing.