MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ABENDING a COBOL Program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
rajeshkoratti
Beginner


Joined: 14 Feb 2006
Posts: 42
Topics: 22

PostPosted: Wed Mar 22, 2006 10:19 pm    Post subject: ABENDING a COBOL Program Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Wed Mar 22, 2006 10:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
rajeshkoratti
Beginner


Joined: 14 Feb 2006
Posts: 42
Topics: 22

PostPosted: Wed Mar 22, 2006 11:03 pm    Post subject: Reply with quote

Thanks Grant
I used CEE3ABD to ABEND my program
_________________
Thanks and Regards..
Rajesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Mar 23, 2006 12:02 am    Post subject: Reply with quote

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
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Fri Apr 07, 2006 10:02 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Apr 10, 2006 12:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group