Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we restart the DB2 UPDATE after the last updated record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Can we restart the DB2 UPDATE after the last updated record
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: 1187
Location: Bangalore,India

PostPosted: Thu Apr 19, 2007 12:18 pm    Post subject:
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    Post subject: Re: DB2 table upadation
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    Post subject:
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    Post subject:
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: 680
Location: NJ

PostPosted: Thu Apr 19, 2007 3:30 pm    Post subject: Interview Question
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    Post subject: Re: DB2 table upadation
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us