View previous topic :: View next topic
|
Author |
Message |
sunnybunny
New User
Joined: 29 Nov 2005 Posts: 49
|
|
|
|
Hello Friends,
Could you anyone help me on the below.
My requirement is, I have two sorted input files. From the first file I am reading the first record with one key. By taking that key as input I am reading the second file to get all the records which are equal to that key.
After reading corresponding records from second file based on some validations iam doing the update and delete operations in a DB2 table.
Next I will read second record from first file and then I will follow the same process which I have explained above.
Hence this is a IMS/DB2 program, I should use restart and check point logic for this. I have used checkpoint in the following scenarios.
1. After every record read from the first file
2. After Deleting the key from table
3. After Updating some other key from table
I am incrementing the Checkpoint field.
And finally I am calling the Check point call for every 500 records of first file.
Now my concern is that, as I mentioned above I am putting the check point frequency as 500 and Iam calling the checkpoint call after 500 reads of first file.
Let us I have deleted the record from database as below.
1. At 800 record
2. At 810 record
3. At 830 record abended.
So now as per my logic program will restart from 501th record and the records 800, 810 are already deleted. So this will gives problem.
Please let us know how to handle this.
Regards,
Sunny. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
????????????
If the only checkpoint you have taken (at the time of the abend at record 830) is at record 500, the deletion of records 800 and 810 would have been rolled back and the will need to be deleted again. |
|
Back to top |
|
|
scdinesh
New User
Joined: 06 Sep 2006 Posts: 44 Location: United States
|
|
|
|
Friend,
Do u issuing checkpoint calls on regardance with file ?
If file then is it flat file or GSAM file?
In flat file checkpoint logic wont work properly....But if it is GSAM file then
go for checkpoint logic with Rolb call (if necessary), also give backout in the jcl..
Thanks,
S.Dinesh |
|
Back to top |
|
|
sunnybunny
New User
Joined: 29 Nov 2005 Posts: 49
|
|
|
|
HI,
Thanks for your information.
Regards,
Sunny. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
So now as per my logic program will restart from 501th record and the records 800, 810 are already deleted. So this will gives problem.
|
checkpoint restart logic SHOULD be single event driven ONLY.
The only reasonable way to do it is to let it be drivent by a read frequency/threshold.
in this way all the updates/deletes will be consistent when related to the input flow.
I would for example ( given the usual if's ) load the first file to a db2 table,
delete each row as soon as the relevant processing has been done.
checkpointing on a chosen frequency.
in case of abend the system will take care of rollbacks and You could simply resubmit the job
regards
e.s |
|
Back to top |
|
|
|