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

Tuning my DB2 program for performance


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Verma,Raman

New User


Joined: 13 Oct 2006
Posts: 15

PostPosted: Thu Oct 26, 2006 10:52 am
Reply with quote

Hi,

I have a COBOL program which accesses a DB2 table.The High Level Functionality is as follows...

> I read a full table into a cursor.
> Process the data (all rows) top to bottom one-by-one
> If the data from a row satisfies a particular condition, I need to delete that row from the table.
> Continue the above three steps until we reach end of cursor.

My concern is that what will happen if

> ...my program abends.Will it have to start looking into the table right from the beginning? ( Is there any sort of checkpointing in DB2 as it is in IMS )
> What will happen if there is any conflict for table usage with any other program? (Do we have any provisions for Hold on table as we have in IMS)

I will be thankful if I get some help with the above questions of mine.

Regards,
Raman
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 26, 2006 1:56 pm
Reply with quote

Hi Raman,

We have BMC utility which take care of abends and checkpoints.
If commit count is given as 1000 then first checkpoint will be generated at 1000record and 2nd checkpoint at 2000.

If program abends at 2500 row i.e, after checkpoint 2 and before checkpoint 3 then BMC will restart the program after checkpoint 2.
This avoids reading all the records.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Oct 27, 2006 8:27 am
Reply with quote

Raman... See what manual says on this...
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Fri Oct 27, 2006 8:11 pm
Reply with quote

Hi Raman,
Can you check if this is feasible for you to do.
1# Unload the table into a Flat File
2# Extract only the required records using Sort
3# Reload the Flat File into the table

This would reduce the READ/DELETE overhead to DB2 and this will be faster than your process.

Thanks,
Itanium.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts exploiting Z16 performance PL/I & Assembler 2
Search our Forums:

Back to Top