Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Forcing the cobol code to abend the Job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Amit Suri

New User


Joined: 28 Oct 2008
Posts: 25
Location: hyderabad

PostPosted: Wed Sep 02, 2009 2:48 pm    Post subject: Forcing the cobol code to abend the Job
Reply with quote

Hi

I have written one cobol code which will count the number of records in the input file and compare the count against the Trailer Record coming with the file : As of now i am displaying a Warning message to the SYSOUT in case count calculated by Program does not match with the count present in the trailer record of the file

Can anyone please suggest me the best way to abend the Job in case of
the count mismatch
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Sep 02, 2009 2:50 pm    Post subject:
Reply with quote

why abend the job? very poor use of resources.

you only want to indicate that counts are not equal.
an abend uses system resources to generate a dump,
as well as the error handling routines.

just set RETURN-CODE to non-zero.
Back to top
View user's profile Send private message
Amit Suri

New User


Joined: 28 Oct 2008
Posts: 25
Location: hyderabad

PostPosted: Wed Sep 02, 2009 3:00 pm    Post subject: Reply to: Forcing the cobol code to abend the Job
Reply with quote

I appreciate your Prompt Reply

I am not in favour of abending the job as it is possibly going to delay the
Process in case the input files have incorect Counts

But our Upstream teams are not in line with us :wink:

Anyways Thanks again
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Wed Sep 02, 2009 3:27 pm    Post subject:
Reply with quote

Language Environment has a callable service to force an abend. Check the LE Programming Reference manual for details of the call.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us