Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2009-10-22T10:34:27Z by SystemAdmin
SystemAdmin
SystemAdmin
308 Posts
ACCEPTED ANSWER

Pinned topic info about task cleaning Cobol program

‏2009-10-19T14:58:09Z |
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
Updated on 2009-10-22T10:34:27Z at 2009-10-22T10:34:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    308 Posts
    ACCEPTED ANSWER

    Re: info about task cleaning Cobol program

    ‏2009-10-20T05:21:42Z  in response to SystemAdmin
    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
    • SystemAdmin
      SystemAdmin
      308 Posts
      ACCEPTED ANSWER

      Re: info about task cleaning Cobol program

      ‏2009-10-20T08:03:45Z  in response to SystemAdmin
      Thanks Hari ..
      could you send me via mail the source of purge.ccs ?
      i don't find it
      :-)
      • SystemAdmin
        SystemAdmin
        308 Posts
        ACCEPTED ANSWER

        Re: info about task cleaning Cobol program

        ‏2009-10-22T07:27:00Z  in response to SystemAdmin
        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
        • SystemAdmin
          SystemAdmin
          308 Posts
          ACCEPTED ANSWER

          Re: info about task cleaning Cobol program

          ‏2009-10-22T10:34:07Z  in response to SystemAdmin
          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
        • SystemAdmin
          SystemAdmin
          308 Posts
          ACCEPTED ANSWER

          Re: info about task cleaning Cobol program

          ‏2009-10-22T10:34:12Z  in response to SystemAdmin
          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
        • SystemAdmin
          SystemAdmin
          308 Posts
          ACCEPTED ANSWER

          Re: info about task cleaning Cobol program

          ‏2009-10-22T10:34:17Z  in response to SystemAdmin
          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
        • SystemAdmin
          SystemAdmin
          308 Posts
          ACCEPTED ANSWER

          Re: info about task cleaning Cobol program

          ‏2009-10-22T10:34:27Z  in response to SystemAdmin
          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