View previous topic :: View next topic
|
Author |
Message |
che
New User
Joined: 31 Mar 2005 Posts: 6 Location: Chennai
|
|
|
|
Problem goes like this
I am reading some data from a table and writing on to a generation of GDG.When write fails i keep track of the count and rewrite records to the same generation using restart logic.
say i have commit count = 10 and write fails in 14 th record.
how do i rewrite failed records as well as update records from 11.
Is it a good practice to do so.Suggestions are welcome.
Thanks in advance for all replies from fellow Forum mates.
|
|
Back to top |
|
|
withnams
New User
Joined: 06 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
Its not a good programming practise. The process is to commit after 'n' records and write those 'n' records into the file.
This way you can avoid the issue. |
|
Back to top |
|
|
che
New User
Joined: 31 Mar 2005 Posts: 6 Location: Chennai
|
|
|
|
mr.chokalingam,
issue is whatif write fails in between. If u read the problem again u wud
have seen commit count is 10 records.
whatif write fails between 10 and 20.
how do i write data on to the same generation with new fetch of data from the table. without deleting records already written.
|
|
Back to top |
|
|
nspreddy
New User
Joined: 29 Jul 2005 Posts: 1
|
|
|
|
Pls clear abt this topic |
|
Back to top |
|
|
shivashunmugam Muthu
Active User
Joined: 22 Jul 2005 Posts: 114 Location: Chennai
|
|
|
|
My suggestioin is
1. Create GDG new version with Disp as (Mod,Catlg,Keep)
2. Have 10 LRCL restart file with value as 000000000 & open it in I-O mode & update the counter (Commit-write) in the periodic interval.
3. Make the pgm to read restartfile, if its zero start process from 1. Else jus read infile till read count > commit count
Hope it shd works...
Correct me if I am wrong. |
|
Back to top |
|
|
|