Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to terminate your cics pgm when it's in infinite loop?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ram_vizag

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Fri Aug 26, 2011 1:49 pm    Post subject: How to terminate your cics pgm when it's in infinite loop?
Reply with quote

When the user is using the screen obviously the program gets the information and populates the info to the screen. so during this process when the cics pgm which gets the info goes infinate loop and after some time you acknowledged that the pgm gone infinate loop, at this instance how do you terminate that program or how do you terminate the task???
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 26, 2011 4:25 pm    Post subject:
Reply with quote

Depending upon your system, it may or may not be possible. If you are running on a system with a single CPU dedicated to the LPAR, AND the loop has no EXEC CICS calls in it, your only recourse is to bring down the CICS region -- and if the CICS region won't cancel, an IPL of the system will be needed. If you have a system monitoring tool such as Omegamon or Mainview, you can use them to cancel the task, again depending upon the configuration.

But your single best bet is to get your site support group to provide you with the answer to your question -- they will know how your system is set up and configured, as well as which tools are installed, and may have some very good suggestions on how to do what you want.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Fri Aug 26, 2011 8:08 pm    Post subject:
Reply with quote

If you have access to another terminal other than the one that's locked with the transaction in a loop and if you have authorization to issue a CEMT on your system then issue a CEMT I,TASK. locate the terminal that's locked with the loop and on the same line move the cursor after the status, enter F,P then press enter. This should force a purge of the task. If the whole CICS region is locked then follow Roberts advice.
Back to top
View user's profile Send private message
ram_vizag

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Mon Aug 29, 2011 1:01 am    Post subject:
Reply with quote

Thanks very much roberts and Jose...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 29, 2011 8:00 am    Post subject:
Reply with quote

Hello,

In code that has one or more loops, suggest you add code to detect a runaway and self-terminate when an "infinite loop" is detected. For example, if the maximum times thru a loop should be 10,000 add 1 to a ws-counter and termniate when the counter reaches 20,000. . . Or insert an EXEC CICS ASKTIME within the loop(s) so the transaction becomes more easily cancelable.

Once the testing is complete and the problem loop(s) correted, these could be turned into comments or removed.

The system support andor computer operations people will be most unhappy if you run code that takes down cics regions. . .
Back to top
View user's profile Send private message
dilip_bangalore

New User


Joined: 29 Sep 2011
Posts: 27
Location: India

PostPosted: Sun Oct 02, 2011 12:28 pm    Post subject:
Reply with quote

Hello,

One thing you can do is, you can bring down the CICS region by stopping the CICS job and try to restart it.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Oct 02, 2011 12:40 pm    Post subject:
Reply with quote

Hello,

Quote:
you can bring down the CICS region by stopping the CICS job and try to restart it.
Not if you intend to remain employed. . .

Sometimes, it is necessary, but should never be consider the "normal" way to operate.

If this happens more than very rarely, it just shows that the developer(s) need someone to watch over them.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us