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

Can we restart the DB2 UPDATE after the last updated record


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rhutwik

New User


Joined: 03 Apr 2007
Posts: 5
Location: Pune

PostPosted: Thu Apr 19, 2007 12:11 pm
Reply with quote

hi all
Please let me know the answer if anyone knows it ...

suppose we are updatiing rows of a db2 table corresponding to value of the key which is supplied from the i/p file.

suppose after updating first 10000 records program abends or stop working. then how can we restart the processing after the last updated record.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Apr 19, 2007 12:18 pm
Reply with quote

Hi There,

Use checkponit restart logic in ur program & after every checkpoint put an explicit COMMIT
Back to top
View user's profile Send private message
rhutwik

New User


Joined: 03 Apr 2007
Posts: 5
Location: Pune

PostPosted: Thu Apr 19, 2007 1:31 pm
Reply with quote

can you please give me some pointers for this logic ... imean from where i can get this kind of info??
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Thu Apr 19, 2007 2:34 pm
Reply with quote

Hi,

Commit/restart capability within a batch application program.

A checkpoint routine will record the status of an executing application program, store the contents of specified program variables, note the position into sequential files, and issue a DB2 COMMIT. If the application program ends abnormally, the status of the program at the last checkpoint will be retained. Upon the restart of the application program, we can recall the last checkpoint information.

We used to use a Checkpoint table where the columns are Program name, Tables Keys, commit frequency and Interval.

I think this mightn't be the case with your application.

Please correct me if i am wrong.

Cheers
Ashwin
Back to top
View user's profile Send private message
rhutwik

New User


Joined: 03 Apr 2007
Posts: 5
Location: Pune

PostPosted: Thu Apr 19, 2007 3:14 pm
Reply with quote

Thanks a lto ......i got your point ..... it is what i wanted but can u pleeeeeeeeeeeeeeeeeeeeese give some pointer so that i can understand this concept in depth ...... Thanks in advance
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Apr 19, 2007 3:30 pm
Reply with quote

Hi,

Use the JCL for Creating Checkpoint as

Code:
//CHECKPT DD DSNAME=CHECK1,
// UNIT=SYSDA,SPACE=(subparms),
// DISP=({NEW|MOD},PASS,KEEP)


In COBOL define it in ENVIRONMENT DIVISION.


Code:
RERUN ON CHEKPT EVERY
10000 RECORDS OF FILENAME.
Back to top
View user's profile Send private message
rhutwik

New User


Joined: 03 Apr 2007
Posts: 5
Location: Pune

PostPosted: Thu Apr 19, 2007 3:36 pm
Reply with quote

thanks a ton icon_smile.gif
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top