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
 
Commit after every 1000 rows

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ashishsr123

New User


Joined: 06 May 2008
Posts: 33
Location: Chennai

PostPosted: Sat Jun 13, 2009 12:42 am    Post subject: Commit after every 1000 rows
Reply with quote

Hello,

I want to devise a cobol-db2 program and commit after every 1000 rows . What are the
1)possible
2) Most efficient
way out.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Sat Jun 13, 2009 1:24 am    Post subject:
Reply with quote

i just maintain a counter (incremented after every SELECT/FETCH/UPDATE - whatever) and check it for 1000 and when it is 1000, COMMIT and reset the counter.

I would suggest reading the links provided in this thread
Back to top
View user's profile Send private message
ashishsr123

New User


Joined: 06 May 2008
Posts: 33
Location: Chennai

PostPosted: Sun Jun 14, 2009 5:07 pm    Post subject:
Reply with quote

We can use checkpoint restart table also for committing...can someone throw some more light on this, I am not fully aware of this.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 14, 2009 10:20 pm    Post subject:
Reply with quote

Hello,

If your organization has implemented some kind of restart table it is completely site-specific. You need to speak with your dba or project senior as to how this is implemented and used on your application (if it is at all).

In about 99% of the applications these days (due to the incredible sppe increase in cpus and dasd) there is no reason to build in restart procedures. It is cleaner to simply restart from the beginning.

Depending on what functions the process provides, properly implementing restart may be far from trivial. Most large batch update jobs (which are the ones that might even be candidates for restart) do more than simply update tables. Audit trail reports are often created, sequential files may be created and so on. Everything must be re-synchronized if a restart is to be implemented.

Keep in mind that jobs should run to successful completion and if one does regularly not run successfully, that job needs to be fixed. If the code is so poor that it will not run correctly, an attempt at implementing restart will probably cause more problems than it provides benefit.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 12 Fri Dec 01, 2017 10:29 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm

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