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: 1190
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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Need Guidance regarding UPDATE query Poha Eater DB2 3 Mon Feb 12, 2018 11:35 pm
No new posts Copying only first and last word from... chandan.inst SYNCSORT 4 Wed Jan 31, 2018 4:19 pm
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm

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