Skip to main content

developerWorks >  WebSphere  >  Forums  >  CICS TXSeries for Multiplatforms  >  developerWorks

info about task cleaning Cobol program    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 7 - Pages: 1 - Last Post: Oct 22, 2009 6:34 AM Last Post By: Hari77 Threads: [ Previous | Next ]
angela01

Posts: 5
Registered: Sep 21, 2009 09:40:33 AM
info about task cleaning Cobol program
Posted: Oct 19, 2009 10:58:09 AM
 
Click to report abuse...   Click to reply to this thread Reply
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
Hari77

Posts: 83
Registered: Jul 31, 2006 12:39:10 AM
Re: info about task cleaning Cobol program
Posted: Oct 20, 2009 01:21:42 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
Angela,

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).

HTH
Cheers,
Hari
angela01

Posts: 5
Registered: Sep 21, 2009 09:40:33 AM
Re: info about task cleaning Cobol program
Posted: Oct 20, 2009 04:03:45 AM   in response to: Hari77 in response to: Hari77's post
 
Click to report abuse...   Click to reply to this thread Reply
Thanks Hari ..
could you send me via mail the source of purge.ccs ?
i don't find it
:-)
angela01

Posts: 5
Registered: Sep 21, 2009 09:40:33 AM
Re: info about task cleaning Cobol program
Posted: Oct 22, 2009 03:27:00 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
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
Hari77

Posts: 83
Registered: Jul 31, 2006 12:39:10 AM
Re: info about task cleaning Cobol program
Posted: Oct 22, 2009 06:34:07 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi 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.

HTH

Cheers,
Hari
Hari77

Posts: 83
Registered: Jul 31, 2006 12:39:10 AM
Re: info about task cleaning Cobol program
Posted: Oct 22, 2009 06:34:12 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi 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.

HTH

Cheers,
Hari
Hari77

Posts: 83
Registered: Jul 31, 2006 12:39:10 AM
Re: info about task cleaning Cobol program
Posted: Oct 22, 2009 06:34:17 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi 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.

HTH

Cheers,
Hari
Hari77

Posts: 83
Registered: Jul 31, 2006 12:39:10 AM
Re: info about task cleaning Cobol program
Posted: Oct 22, 2009 06:34:27 AM   in response to: angela01 in response to: angela01's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi 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.

HTH

Cheers,
Hari
 Tags
Help

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.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums