IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Checkpoint & Restart logic


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunnybunny

New User


Joined: 29 Nov 2005
Posts: 49

PostPosted: Tue Jul 17, 2007 5:15 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 17, 2007 5:36 pm
Reply with quote

????????????
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
View user's profile Send private message
scdinesh

New User


Joined: 06 Sep 2006
Posts: 44
Location: United States

PostPosted: Tue Jul 17, 2007 6:10 pm
Reply with quote

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
View user's profile Send private message
sunnybunny

New User


Joined: 29 Nov 2005
Posts: 49

PostPosted: Wed Jul 18, 2007 11:49 am
Reply with quote

HI,

Thanks for your information.

Regards,
Sunny.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jul 18, 2007 11:59 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
This topic is locked: you cannot edit posts or make replies. Need assistance in job scheduling logic. Mainframe Interview Questions 2
No new posts Rexx Logic error while adding seperat... CLIST & REXX 3
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts IMS Restart Failure IMS DB/DC 4
Search our Forums:

Back to Top