IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

hot to get details when "EXEC CICS HANDLE ABEND" is used


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Tue Sep 20, 2016 5:01 pm
Reply with quote

Hey,

we have some COBOL program which is listening on a socket for some incoming data. It is running all day until we stop it with some other transaction by doing:

Code:
00374            EXEC CICS SET TASK(C-TASK-ID) FORCEPURGE NOHANDLE END-EXEC


The stopped program has some Abend-Handling:
Code:
EXEC CICS HANDLE ABEND LABEL(ABNORM-END) END-EXEC


So it goes to ABNORM-END procedure when it will be purged. And we close the socket before we return to CICS.

But sometimes we also have other abends, then this abend-routine also is called and close socket and returns to cics.

Is it possible to get some Abend details in our abend routine when we notice that it is some abnormal end which is not forced by our other program? Maybe some Abend-Code or something... It would help a lot to analyse why after some hours the program stops working.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 20, 2016 5:32 pm
Reply with quote

Your post is as clear as mud. You seem to be asking at least two separate and different questions:
Quote:
1. Is it possible to get some Abend details in our abend routine

Have you looked at the EIB data to see if it provides what you want? Furthermore, WHAT other ABENDS are you seeing -- an AICA is very different than an ASRA and should be handled differently, just for one example?
Quote:
2. It would help a lot to analyse why after some hours the program stops working.

You had not previously mentioned that the program stops working, so is this a separate issue? Furthermore, "stops working" is a waste of typing -- do you mean that the transaction abends? the program disappears from CICS without a transaction abend? the program is running but not responding to socket data? the program is running and responding to socket data but doing so incorrectly? or some other "stops working" condition you haven't explained?
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Tue Sep 20, 2016 7:33 pm
Reply with quote

Ok sorry if maybe to much or unclear informations. At all I have just one question:

How can i get details about the Abend when the cobol program runs into my 'ABNORM-END' procedure?

I just know that something occured because i arrive in ABNORM-END. But I want to know what.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 20, 2016 8:22 pm
Reply with quote

Have you looked at EIBFN or EIBRCODE? Depending upon what deails you want, you may - or may not - be able to access them.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Sep 20, 2016 9:42 pm
Reply with quote

1.Write into error log file- (VSAM/DB2/or any DB) in the same routine.
2.Add Display.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Wed Sep 21, 2016 5:26 am
Reply with quote

It all depends how you have designed your ABNORM-END procedure and what extra information you seek from abend.

Else as Rohit has suggested, you can trap and write it into error file.

Perhaps, you can use HANDLE CONDITION to handle any problems related to CICS commands. Experts, please correct me.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Sep 21, 2016 9:13 am
Reply with quote

HANDLE COND is used for standard program error checks provided by CICS , moreover it needs additional precaution of using PUSH and POP in case of communicating between programs. Better way is to use RESP OR RESP2.
But TS Is looking for a way to identify the source by which the ABEND routine got called which is customized to the program logic. So the best way is save information of the ABEND before calling the ABEND routine and then write all the information to error log file which can be DB2 or VSAM and one can go further and create a new transaction which will render all the errors on the screen occurred today which makes it more simpler for investigating any problem or just add the DISPLAY's and pull the logs to see the cause.
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Wed Sep 21, 2016 12:24 pm
Reply with quote

Rohit Umarjikar wrote:
1.Write into error log file- (VSAM/DB2/or any DB) in the same routine.
2.Add Display.


Exactly that is my problem. I am in this abnorm-end routine and don't know where to get this informations that i could write to a logfile or display on screen. At the moment i just can see if it was purged by our other program or if not. But in the if not case i want to get anywhere some details why i am in abend routine.

Robert Sample wrote:
Have you looked at EIBFN or EIBRCODE? Depending upon what deails you want, you may - or may not - be able to access them.


I will google what it is and will look if i can use it, thanks.

Quote:
Better way is to use RESP OR RESP2.

We are using that normally. But this abend-routine we did because we wanted to close soket when we purge the program from other program.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Sep 21, 2016 4:02 pm
Reply with quote

Quote:
I will google what it is

Why Google? Why not use the official documentation. At least it should be correct whereas stuff from the internet may not be.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Thu Sep 22, 2016 8:19 am
Reply with quote

EIBFN will help you determine the last CICS command executed.

EIBRCODE will give you the CICS response code after the last CICS command has finished.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Thu Sep 22, 2016 8:38 am
Reply with quote

Rohit Umarjikar wrote:
HANDLE COND is used for standard program error checks provided by CICS , moreover it needs additional precaution of using PUSH and POP in case of communicating between programs. Better way is to use RESP OR RESP2.


Thank you Rohit for sharing the knowledge.

And just for reference of Andi1982, RESP contains a number corresponding to the condition raised for instance 00 for Normal and RESP2 is more descriptive.
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Fri Sep 23, 2016 2:55 pm
Reply with quote

Thanks a lot to everybody,

I did not know about the EIB* fields. it helped me a lot. We solved it finally with the PUSH and POP functions. So now when it is not forced exit from other program we will get the normal Abends like it would be without any user defined abnormal end routine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top