IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading the next COBOL record after the abend


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sumanthmain

New User


Joined: 22 Aug 2005
Posts: 14

PostPosted: Mon Jan 30, 2006 10:12 pm
Reply with quote

In cobol file we have 1500 records.., whenever we are reading at 900 we got abend .., how we can read that file from 901 next on next read..

advance thanks buddies


cheers
sumanth
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Jan 30, 2006 10:28 pm
Reply with quote

Thats where check point logic comes into picture....

Or else do a display of READ COUNT after processing so that you can identify how many records have been processed before ABEND.

Then edit your input file as needed before restarting.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 5:39 pm
Reply with quote

Sumanth,

There must be a reason why your program abends after 900 records. Can you provide the appropiate information about that? Thus we may help you better with your problem.

Cheers,
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Tue Jan 31, 2006 7:20 pm
Reply with quote

Hi,
while reading use some count verb so that u can know the number of records processed. After abending use this count in start verb of COBOL and then read the file.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 7:36 pm
Reply with quote

It's known only 900 records are processed. There must be a failure in the program or the data in record 901 is corrupt. The 1500 records can be processed if the program and/or the input is corrected. Once a program has abended it can't read any more records. In PL/I we use to catch errors in the ON ERROR blocks (like ON DATAEXEPTION BEGIN....).

I'm afraid restart is no option because the program will abend while processing the first record after skipping the 900 already processed. In the dump you can find which record was read last by the program. It's at the end of the dump; search for DDNAME.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 8:04 pm
Reply with quote

Sorry for a mistake in former post. Actually the block overriding the system action is ON CONVERSION BEGIN followed by statements like reading the rest of the inputfile in stead of activating the system conditioin like S0C7. There are some more but this won't help I realize your're talking COBOL. Don't know if COBOL provides these kind of ON-blocks.

Cheers,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top