View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
Is there anyway to kill/PURGE a CICS transaction that has been running for over a certain elapsed time limit/CPU time limit.
We have Mainview for CICS
Regards,
Vasanth.S |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I will check this. I don't know if we have that product licensed. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thanks for the link, but I am unable to find the Threshold Advisor from the Mainview menu. I suspect we are not licensed for it.
These are the available options, I did look into each option, but no mention of Thresholds
Code: |
--------------------------- MAINVIEW Selection Menu -------
OPTION ===>
0 Parameters and Options
E Alerts and Alarms
P PLEX Management (PLEXMGR)
U Utilities, Tools, and Messages
Solutions for:
A Automated Operations
C CICS
D DB2
I IMS
J JAVA Environments
L Linux and z/VM
N Network Management
O Cost Optimization
S Storage Management
T Application Management and Performance Tuning
W MQ and WAS
Z z/OS and USS |
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thanks, We have ICVR set to 20000 - 20 seconds, but the transactions just keep running over 20 minutes, if they are looping. I think there is a specific criteria that needs to be met to satisfy the ICVR time and for a transaction to be cancelled. It is very confusing. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
define loop please ?
the ICVR definition is
Quote: |
CICS might purge a task if it has not given up control after the RUNAWAY interval for the transaction (or ICVR if the transaction definition specified RUNAWAY=SYSTEM). |
and applies to a CPU loop, but if the loop contains cics calls the ICVR does not apply |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thank you for looking into this.
Quote: |
but if the loop contains cics calls the ICVR does not apply |
I honestly have no idea how the handover between CICS and DB2 takes place, when there is a CICS transaction accessing DB2.
In my scenario, there is a CICS transaction that accesses DB2 table and looks for a row, if the row is not found then the program keeps looking for the row indefinitely(this is what I perceived as looping).
The transaction was running for like 15 minutes before it was cancelled. Would ICVR value apply in this case?
I understand that this is a program fault & needs to be corrected, but I am trying to address it from CICS perspective to handle such (rare)buggy transactions. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
unfortunately that' s not cics point of view
Quote: |
The transaction was running for like 15 minutes before it was cancelled. Would ICVR value apply in this case? |
NO, if the program relinquishes control, for cics is not CPU looping
and how in heaven can cics distinguish a legitimate long running task
from a faulty one ? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
and how in heaven can cics distinguish a legitimate long running task
from a faulty one ? |
You are right, it makes sense now. Thank you.
I was looking for a parameter like DB2-Resource Limit Facility in CICS. Many sites say that a monitor is needed and there is no inherent way to limit CPU.
I wish there was an in-built one |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
I was looking for a parameter like DB2-Resource Limit Facility in CICS. Many sites say that a monitor is needed and there is no inherent way to limit CPU.
I wish there was an in-built one
|
should ASUTIME set in DB2 gives you -904 in your cics db2 program and then you do a proper error handling to end the current running task ? That’s being followed by almost everyone since it’s one of the bad sqlcode and most common one . |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
should ASUTIME set in DB2 gives you -904 in your cics db2 program and then you do a proper error handling to end the current running task ? That’s being followed by almost everyone since it’s one of the bad sqlcode and most common one . |
AFAIK, the program does not receive a -904 for record not found. The row is 'logically' not found by the program. The program looks for a column with a selective value and just reads sequentially, it is a program logic and not a straight up query.
We are unable to set a limit on DB2 side because
1. It is very hard to identify each stuff that runs on DB2 and set a limit for them. There are just too many variety of things.
2. Queries initiated by CICS are the main culprits, because they run with very high service class and causes outages. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
I mean my point is any sql query being issued it must finish it up in Less than or equal to ASUTIME even if row not found situation else it should give you -904.If it’s not a DB2 thread and some other looping issue in the program then that program needs a emergency fix.
Moreover, I am not sure but you can able to lower the priority of the long running task. |
|
Back to top |
|
|
John Poulakos
Active User
Joined: 13 Jun 2012 Posts: 178 Location: United States
|
|
|
|
Are you sure the CICS transaction is actually running and consuming CPU, or is it just waiting? If you kill the transaction, you should see if you can find a TRU exit in the dump. I have seen transactions hang many times when a TRU exit is present, because a TCB gets posted under the wrong storage key. TRU exits are fairly common with DB2 under CICS.
If you aren't familiar with TRU exits, google "CICS TRUE". |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi John,
I do not know CICS TRUE, I will look it up. Thanks.
Quote: |
Are you sure the CICS transaction is actually running and consuming CPU, or is it just waiting? |
Yes the transaction was actually running because of a program bug. The program was supposed to loop through a DB2 table and find an available number between 1 and 999.
But for that scenario, there happened to be no free numbers.
This scenario was not handled and the program kept looking for available numbers till eternity. |
|
Back to top |
|
|
|