View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I have 3 programs, let's say, pgma, pgmb,pgmc,
pgma links pgmb, and pgmb links pgmc,
I have 'CICS HANDLE ABEND' command at the very beginning of pgma, which is meant to capture CICS ABEND happens in pgma, pgmb, and pgmc.
but there r two questions:
1. when CICS abend occurs in pgmc, how can pgma knows it's pgmc that abend occurred in? HANDLE ABEND routine cannot capture the abend pgm name from EIB fields.
2. I found that some CICS abend like 'ASRA', sometimes can be captured via HANDLE ABEND routine, but sometimes it cannot be captured, which is captured by FA, why???
As to my experience,when an abend is captured by HANDLE ABEND routine, then it cannot be captured by FA again, and vice versa. |
|
Back to top |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
The first question you should raise is: Why do I want to handle an abend? This is not normal and an abend indicates a severe error, and cant be "eliminated" by a Handle Abend. |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
Peter cobolskolan wrote: |
The first question you should raise is: Why do I want to handle an abend? This is not normal and an abend indicates a severe error, and cant be "eliminated" by a Handle Abend. |
I'm not trying to eliminate abend, I'm trying to make sure the program go the error processing routine even if when an abend accurs. |
|
Back to top |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
If you think you have to do some error processing in case of abend, I beleive you have missed something. A Transaction Processing system like CICS takes care of abend situations, and will back out any updates to "protected resources", like files and databases, so there will be no traces of the abended transation and it will look as if the transaction was never run.
If you still think you have to do som processing, you should take a closer look at your design |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I tend to leave a "trail" so that when I get an abend I can see in the dump where I've been. Something like...
Code: |
01 FILLER PIC X(30) VALUE 'WS-PROGRAM-TRAIL BEGINS HERE'.
01 WS-PROGRAM-TRAIL.
05 WS-FROM-PROGRAM PIC X(08) VALUE SPACES.
05 WS-CURR-PROGRAM PIC X(08) VALUE SPACES.
05 WS-CURR-PARAGRAPH PIC X(20) VALUE SPACES. |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I'm trying to make sure the program go the error processing routine even if when an abend accurs. |
This will not always happen. There are abends where CICS processes the abend and the program will not -- EVER -- have any control over that process. |
|
Back to top |
|
|
sarwanz
New User
Joined: 21 May 2013 Posts: 2 Location: United States
|
|
|
|
You can execute the online module by CEDF mode to find out exactly where the module abends. The CEDF mode is a step by step execution method of an online module. You can find out the variable values in the screen when it abends. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
When trapping this under CEDF, when the abend occurs, you need to subtract X'38' (length of CICS/COBOL stub) from the OFFSET value displayed on the screen. This should point you to the failed instruction.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
More effort should be put into abend prevention than dealing with an abend within the code.
Well-written and well-tested code does not abend.
If there Are abends, refer to the previous statement.
Several of the online systems i've supported have not had a Production abend in years. . . |
|
Back to top |
|
|
|