Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6967
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 after TBSARG: Row 370 from 1000 Pedro TSO/ISPF 1 Fri Apr 14, 2017 2:32 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us