Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Purge CICS transaction after a time limit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Thu Aug 30, 2018 4:34 am    Post subject: Purge CICS transaction after a time limit
Reply with quote

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
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1298
Location: Israel

PostPosted: Thu Aug 30, 2018 3:44 pm    Post subject:
Reply with quote

Did you check the "MainView Threshold Management Guide" ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Fri Aug 31, 2018 12:46 am    Post subject:
Reply with quote

I will check this. I don't know if we have that product licensed.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Fri Aug 31, 2018 11:51 pm    Post subject:
Reply with quote

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 icon_sad.gif
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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2015
Location: NY,USA

PostPosted: Sat Sep 01, 2018 12:54 am    Post subject:
Reply with quote

You control them using ICVR per CICS Region.
Or check Task Time-Out Management function within MainView Product.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Wed Sep 05, 2018 12:02 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10515
Location: italy

PostPosted: Wed Sep 05, 2018 12:10 am    Post subject: Reply to: Purge CICS transaction after a time limit
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Wed Sep 05, 2018 12:18 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10515
Location: italy

PostPosted: Wed Sep 05, 2018 2:44 am    Post subject: Reply to: Purge CICS transaction after a time limit
Reply with quote

unfortunately that' s not cics point of view icon_smile.gif

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Wed Sep 05, 2018 3:33 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2015
Location: NY,USA

PostPosted: Wed Sep 05, 2018 4:30 am    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Wed Sep 05, 2018 5:27 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2015
Location: NY,USA

PostPosted: Wed Sep 05, 2018 4:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Native CICS srini24 CICS 2 Thu Sep 13, 2018 2:44 am
No new posts Error while trying to open an AIX in ... amitc23 CICS 4 Tue Sep 04, 2018 12:15 pm
No new posts GDG Limit 255 Reason srini24 All Other Mainframe Topics 7 Mon Sep 03, 2018 2:59 pm
No new posts cics-dbctl connection and disconnection meykh2014 CICS 3 Sat Aug 18, 2018 5:38 pm
No new posts How to control the elapsed time for a... Philippe JCL & VSAM 12 Thu Aug 09, 2018 5:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us