Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reading the next COBOL record after the abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Reading the next COBOL record after the abend
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: 1452
Location: Chicago, IL

PostPosted: Mon Jan 30, 2006 10:28 pm    Post subject: Re: about cobol files
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 5:39 pm    Post subject:
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    Post subject: Re: Reading the next COBOL record after the abend
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 7:36 pm    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 31, 2006 8:04 pm    Post subject:
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    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. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us