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
 

 

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

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

New User


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

PostPosted: Tue Sep 20, 2016 5:01 pm    Post subject: hot to get details when "EXEC CICS HANDLE ABEND" is used
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: 7913
Location: Bellevue, IA

PostPosted: Tue Sep 20, 2016 5:32 pm    Post subject:
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: 31
Location: Karlsruhe / Germany

PostPosted: Tue Sep 20, 2016 7:33 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Tue Sep 20, 2016 8:22 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Sep 20, 2016 9:42 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Wed Sep 21, 2016 9:13 am    Post subject:
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: 31
Location: Karlsruhe / Germany

PostPosted: Wed Sep 21, 2016 12:24 pm    Post subject:
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: 1715
Location: UK

PostPosted: Wed Sep 21, 2016 4:02 pm    Post subject:
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    Post subject:
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    Post subject:
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: 31
Location: Karlsruhe / Germany

PostPosted: Fri Sep 23, 2016 2:55 pm    Post subject:
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    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 CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm


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