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

Restarting the program from the error record


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

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Wed Dec 21, 2005 2:44 pm
Reply with quote

hi all,

I am reading a input file and writing into output file
For first run i am getting error at 30 th record and program got abended
for the next run i have to start from the 31st record
how do i Restart the program to write from 31st record

Thanks in advance
Balaji
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Dec 21, 2005 7:29 pm
Reply with quote

Hi,

Quote:
how do i Restart the program to write from 31st record


I believ it is not possible to run the program form 31 record.

Regards
Rupesh
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Wed Dec 21, 2005 9:56 pm
Reply with quote

This is a very normal case if some one is working in Production Support Environment.

In this case you'll have to EDIT your INPUT DATASET & DELETE 30 records, so that it starts with 31st record. (But make sure you have a back up of the original dataset ready)
Now you can run your program again & it'll process from 31st record.

I hope you'll take care of other formalities like O/P dataset etc before restarting the job/program again.

Regards,

Priyesh.
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Thu Dec 29, 2005 2:13 pm
Reply with quote

Hi,

Try This....

* use a record-counter.write this counter to ps file whenever u read a new record.

*so if the program gets abend means..u can get the counter from ps file which u saved and skip that no.of records

*so after skipping u can get the unread record which u can write to the output dataset....

icon_idea.gif Rajesh icon_idea.gif
Back to top
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Atlanta, (USA)

PostPosted: Thu Dec 29, 2005 10:00 pm
Reply with quote

Hi,

This is a very common problem and happens in production job runs. For a long term solution you can keep a file as restart file in the program which contains the number of records processed. When the job abends just restart the job, pick the counter from restart file and read the input file until that counter is reached and then start processing from next record.

For now you can just read the input file 30 times and then start processing from 31 record. Hope this works.

thanks
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Thu Dec 29, 2005 10:10 pm
Reply with quote

Check this out..

ibmmainframes.com/viewtopic.php?t=7190&highlight=
Back to top
View user's profile Send private message
mijanurit
Currently Banned

New User


Joined: 26 Aug 2005
Posts: 33
Location: bangalore

PostPosted: Sat Jan 07, 2006 11:57 pm
Reply with quote

hi!

i think rajesh is correct. use acounter in ur program and write the counter to a ps file each time when u read a new record.
when ur program abend u can get the last record u have read from ur ps file.
now u can restart ur program from the desire recored.


regards
mijanurit
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 9
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top