View previous topic :: View next topic
|
Author |
Message |
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
1.Write into error log file- (VSAM/DB2/or any DB) in the same routine.
2.Add Display. |
|
Back to top |
|
|
Kerry Ropar
New User
Joined: 14 Sep 2016 Posts: 25 Location: Australia
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
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 |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Kerry Ropar
New User
Joined: 14 Sep 2016 Posts: 25 Location: Australia
|
|
|
|
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 |
|
|
Kerry Ropar
New User
Joined: 14 Sep 2016 Posts: 25 Location: Australia
|
|
|
|
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 |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
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 |
|
|
|