View previous topic :: View next topic
|
Author |
Message |
nabihtrap
New User
Joined: 28 Jul 2009 Posts: 2 Location: chennai
|
|
|
|
Hi All,
I have a program which uses VSAM file as a restart file. The program updates a database (DB2) and has a restart logic using the VSAM file.
It commits after every n records processing the Database and writes the last committed record keys in the VSAM restart file.
Now when job is terminated due to any fatal error like db2 contention or data exceptions the VSAM restart file has the last committed record but if the job fails due to time out or if the job is canceled the VSAM restart file doesn't have the last committed records.
Can you please let me know why this happens?
Thanks
P.s. there is no problem in anyways if the restart file is a PS |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Quote: |
Can you please let me know why this happens? |
I believe more info would be needed for us to be able to help.
If i understand, the vsam file behaves differently for an s0c7 and a s222?
How often is a commit and the vsam file update done? Is the vsam record repeatedly read and updated? What happens if the vsam file is closed and re-opened between updates? I don't suggest this as a solution, only an experiment.
Why not use the PS restart file?
Why not discontinue recovering and simply restart the job from the beginning after the current abended process is backed out? |
|
Back to top |
|
|
nabihtrap
New User
Joined: 28 Jul 2009 Posts: 2 Location: chennai
|
|
|
|
Hi,
Thanks a lot for your response.
Quote: |
How often is a commit and the vsam file update done? Is the vsam record repeatedly read and updated? What happens if the vsam file is closed and re-opened between updates? I don't suggest this as a solution, only an experiment. |
The commit depends on the commit frequency, currently its 100 records. The VSAM is written every time the frequency reaches 100. The VSAM is not closed and re-opened in between the program is running. That is the reason VSAM file is implemented for restart logic. It reduces the number of file open and close operation.
Quote: |
Why not use the PS restart file? |
Re-write a PS file is not working for restart. We tried doing a close, read and write every time the commit happens. But that’s too much of file operation, so switched to VSAM. Where using the single key I can write a single record as many times as possible.
Quote: |
Why not discontinue recovering and simply restart the job from the beginning after the current abended process is backed out? |
The problem is that the job is running over 60 Million data and sometimes, it goes on timeout. If 20 MM records are processed and db2 operation is performed, we don’t want to re- run from beginning. |
|
Back to top |
|
|
|