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
 

 

Restarting the program from the error record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Restarting the program from the error record
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: 464

PostPosted: Wed Dec 21, 2005 7:29 pm    Post subject: Re: Restarting the program from the error record
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: 1452
Location: Chicago, IL

PostPosted: Wed Dec 21, 2005 9:56 pm    Post subject: Re: Restarting the program from the error record
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    Post subject: Re: Restarting the program from the error record
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: Kentucky, USA

PostPosted: Thu Dec 29, 2005 10:00 pm    Post subject: Re: Restarting the program from the error record
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    Post subject:
Reply with quote

Check this out..

http://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    Post subject: Re: Restarting the program from the error record
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    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
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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