| View previous topic :: View next topic |
| Author |
Message |
rajeshkoratti Beginner
Joined: 14 Feb 2006 Posts: 42 Topics: 22
|
Posted: Wed Mar 22, 2006 10:19 pm Post subject: ABENDING a COBOL Program |
|
|
Hi All
I would like to know how can you forcefully ABEND a COBOL Program?
Ok let me explain it in detail.
I have a PARM file which will have only one record. IF the file is empty (Which will not occur in ideal scenarios) i want the program to ABEND rather than just displaying a SYSOUT message.
Is there anyways i can acheive it. _________________ Thanks and Regards..
Rajesh |
|
| Back to top |
|
 |
Grant Beginner
Joined: 02 Dec 2002 Posts: 45 Topics: 1 Location: Sydney, NSW, Australia
|
Posted: Wed Mar 22, 2006 10:40 pm Post subject: |
|
|
If you really need to abend, have a look for CEE3ABD (or ILBOABN0 if not LE).
It seems overkill to abend in this situation. What information is the dump going to tell you that could not be obtained from 1 line in your sysout ?
You may also want to move a value to RETURN-CODE |
|
| Back to top |
|
 |
rajeshkoratti Beginner
Joined: 14 Feb 2006 Posts: 42 Topics: 22
|
Posted: Wed Mar 22, 2006 11:03 pm Post subject: |
|
|
Thanks Grant
I used CEE3ABD to ABEND my program _________________ Thanks and Regards..
Rajesh |
|
| Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Mar 23, 2006 12:02 am Post subject: |
|
|
Rajesh,
Go for Grant's suggestion.
| Quote: | | You may also want to move a value to RETURN-CODE |
There might be jobs that need to run/not run based on return code. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
| Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Fri Apr 07, 2006 10:02 am Post subject: |
|
|
Hi,
Even you can force a S0C7 abend also after checking the file for emptiness. We use to do this by adding numeric to an uninitialized alphanumeric variable in our earlier project. Strangely, it was the client that asked for this type of program abend. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
| Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Mon Apr 10, 2006 12:21 am Post subject: |
|
|
Mf_User,
Its always good to use user Abends accompanied with a Sysout message explaining the reason rather than using System abends. It might lead to unwanted confusions. Ofcourse, you do not have a choice when your client insists for such a thing but the best practice is to give a clear picture of what happened to production support guys.
Thanks,
Phantom |
|
| Back to top |
|
 |
|
|
|