View previous topic :: View next topic
|
Author |
Message |
sbalajibe
New User
Joined: 15 Aug 2005 Posts: 62
|
|
|
|
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 |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
rajesh_1183
Active User
Joined: 24 Nov 2005 Posts: 121 Location: Tadepalligudem
|
|
|
|
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....
Rajesh |
|
Back to top |
|
|
muffirulz
New User
Joined: 14 Sep 2005 Posts: 74 Location: Atlanta, (USA)
|
|
|
|
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 |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
Back to top |
|
|
mijanurit Currently Banned New User
Joined: 26 Aug 2005 Posts: 33 Location: bangalore
|
|
|
|
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 |
|
|
|